[chuck-users] assignment of integers?

Kassen signal.automatique at gmail.com
Tue Feb 19 21:43:58 EST 2008

Fellow ChucKists,

int foo @=> int bar;

//yields semi-random high number


1 => int foo @=> int bar;

//yields "1"

2 => foo;

//yields "1"

Integers seem to be in some sort of state of doubt between being assignable
and not being assignable (maybe also in doubt about being a object? the poor

This becomes somewhat important if bar is a member of a class that -for it's
member functions- would benefit from knowing what happens around it. I can
still turn both foo and bar into length 1 arrays or keep passing foo as a
argument to such functions but that's not as pretty.


PS for those who hadn't seen this yet; length 1 arrays to trick integers
into becoming full objects was cooked up by Frostburn here;

Maybe inspired by this strategy to turn functions into objects (in a
roundabout way);

Tricky but useful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080220/1dede028/attachment.htm 

More information about the chuck-users mailing list