Search   Feed   Browse   Add
Feed items 1 - 1 of 1 for January 2008

Io

Io programming language

Constants - January 10, 2008

Kevin Greer posted this to LtU recently and I though it was worth repeating due to the recent interest in dynamic features: Constant := Object clone do ( with := method(msg, self msg := msg self activate := method(call message setName(msg asString); msg) ) ) Lets try it out: Make PI a regular number PI := 3.1415926 Make b a method that uses it b := method(PI+PI) writeln(b) - 6.283185 Inspect bs "source" code writeln(getSlot("b") code) - block(PI...
http://www.iolanguage.com/blog/blog.cgi?do=item&id=108
Available Archives
- January (1 item)
- February (1 item)
- March (1 item)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact