37 lines · 1.1 KB · Text
RawDownload
// name: help.ck//       (available in chuck-1.4.1.0 and later)// desc: example showing .help(), which can be invoked on//       any object or class; .help() dynamically generates//       information regarding the underlying type of an object//       or a class and outputs this information to the console.//       the information includes the inheritance chain of the//       type in question, its functions as well as functions//       inherited from its parent (and its parent's parent, and//       so on).//// .help() is designed to be a run-time teaching/learning tool//       and a quick referencewhile programming. It's fun, sort of! // an object/ugen instanceSinOsc osc;// call help() on it to learn about its underlying informationosc.help(); // help() can be called directly on classes without instancesMachine.help(); // 2-d int arrayint a[10][10];// calling apropros on a 2d-arraya.help();// calling apropros on an arraya[0].help(); // a user-created classpublic class Foo{    fun void bar()    { <<< "hi" >>>; }}// calling help() on the classFoo.help();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t