Page 1 of 1

Adding to a variable.

Posted: Mon Feb 16, 2009 3:42 pm
by bokkie
Almost to embarrassed to ask but...

I found some code used in updating progress bars and gauges. Following snippet:

PROGRESS = $PROGRESS$ + 1
PROGRESS1 = $PROGRESS$ * 10

Set Variable FRED to 3


How can I enter a statement like FRED = $FRED$ + 15? The PROGRESS and PROGRESS1 statements are valid but I can't work out how you actually enter those in the MSIcode window.

Any ideas appreciated.

Posted: Mon Feb 16, 2009 5:02 pm
by StyX
Mathemathics

*StyX- goes back to his seat, while watching for a light bulb to appare above bookie's head*

Posted: Mon Feb 16, 2009 5:23 pm
by bokkie
StyX wrote:Mathemathics

*StyX- goes back to his seat, while watching for a light bulb to appare above bookie's head*
Doh! Mathematics? I was looking at it the other day but it never occurred to me to think of it as useful for adding two numbers together. Thanks for the light bulb Styx. Now, if I can only work out how to switch it on. Homer Simpson would be proud of me and welcome me as one of his own. Doh!

EDIT: I should have realised that by positioning on the statement and hitting the enter key would have displayed the Mathematics dialog.

Posted: Mon Feb 16, 2009 9:20 pm
by MichaelNesmith
Also, to append/prepend a value to a variable, you can call Set Variable VAR to "prepend $VAR$ append" etc...