Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline mkraska  
#1 Posted : 16 December 2012 19:22:53(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
consider the following example:

j:2

for(j,range(1,4),a:j)

j=4

Now edit the loop expression and change it to any expression without assignment operator with or without j in it

for(j,range(1,4),a)

When leaving the math region, nothing happens.

j=4

As soon as you trigger re-calculation manually, j changes to 2, indicating that the loop iteration is not performed in the global namespace.

j=2

Still there is iteration as you can see using trace(j) as loop body.

for(j,range(1,4),trace(j))

I think, that changes in expressions should trigger re-calculation if that option is set in the options.

Also, I really discourage the use of implicit variable scoping magics. I guess that it is not by intent to overwrite the global imaginary unit i depending on what precisely you do inside iterations with i as counter.

If the mentioned dependency is a feature and not a bug I would like to learn how this contributes to comprehensable documents.

Best regards, Martin Kraska

Edited by user 23 March 2014 18:35:46(UTC)  | Reason: Not specified

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Rising Eagle  
#2 Posted : 17 December 2012 05:26:49(UTC)
Rising Eagle


Rank: Member

Groups: Registered
Joined: 14/12/2012(UTC)
Posts: 23
Location: Neverland

Was thanked: 15 time(s) in 9 post(s)
Without reading this post, I just posted the same thing in the clear discussion.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.