[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] string formatting notation



> On 22.12.2017, at 17:59, i@xxxxxxxxxxxxxx wrote:
> 
> 
> This actually does work:
> 
> 	10 squared: “fish”
> 	-> 100


also this works, of course:

r { 3.do { 7.rand.yield } }
p { 3.do { 7.rand.yield } }

It works, because the function is explicit.

This won’t:

f = { 3.do { 7.rand.yield } };
r f



>> On 22 Dec 2017, at 16:53, i@xxxxxxxxxxxxxx wrote:
>> 
>> If that works, then why doesn’t
>> 
>> 	squared 2.0


I suppose that the interpreter can’t know here if squared is a variable.

So, e.g.

(
var squared = 8;
squared 2
)




Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail