Filter expressions: Does "for.. do" work?

45 views
Skip to first unread message

step7

unread,
Jun 25, 2012, 6:50:00 AM6/25/12
to mat...@googlegroups.com
Hi to all, just joined the group :)
I'm running the Mathmap 1.3.5 plugin, hosted by Gimp2.6 under Windows and having lot's of fun with this great tool.
Just started writing filter expressions, struggling at times but working my way through the snags. Stuck on this one though..

Is the "for.. do" construct implemented in 1.3.5? I see it referred to in the Language Reference web page but can't get code like this to parse:

for cc = 1 to 10 do
  print(cc);
end

Also can is there a way of seeing the output stream when running Mathmap as a plugin?

Thanks!

step7

unread,
Jul 2, 2012, 11:22:02 AM7/2/12
to mat...@googlegroups.com
Oops, it is implemented - just have to re-read the language reference and get the syntax right.

for cc = 1..10 do
  print(cc)
end;

Some curious things going on with the semicolon requirements, looks like the last statement before the "end;" never needs one.

So this parses..
for cc = 1..10 do
  print(cc);
  print(cc)
end;

Still curious about how to get at the output stream, debugging is a chore! Considering hacking out some code to write text/values on to the output image for debugging which is pretty desperate.
Reply all
Reply to author
Forward
0 new messages