Re: Programming Puzzle 1 - Simple Loop
Very nice, Thomas.
The message board left justifies your script. That makes it harder to read scripts because we lose the indents.
To preserve the indents prepare your reply using the "Go Advanced" button, and then encapsulate your code with CODE tags, like this:
The # button on the advanced editor toolbar will do this for you. Just select the text to be encapsulated, and click #.
Also, when you develop a solution to the next puzzle, I suggest you learn how to "export" your script as a text file, and then simply attach it to a reply here. If you use the script export tool in Alpha Five the text file will be specially formatted to work with Alpha's import tool. This makes it easier for us to study your code and run it on our machines. We just import your previously exported script. To get to the export (and import) tools, save your script to the Code page of the A5 control panel. Then right click the script name. Choose Export off the drop down list (context menu).
Welcome to the board!
Very nice, Thomas.
The message board left justifies your script. That makes it harder to read scripts because we lose the indents.
To preserve the indents prepare your reply using the "Go Advanced" button, and then encapsulate your code with CODE tags, like this:
Code:
option strict dim target_num as n = 0 'used to determine if number is even dim i as n = 0 dim result as n = 0 'result adds the total of the even numbers dim num_loops as n = 0 'counts the number of interations for i = 302 to 101 step-2 num_loops = num_loops + 1 target_num = i if mod(target_num,2)= 0 then result=result+target_num end if next i ui_msg_box("Program Puzzle One","The answeres are Sum = "+ alltrim(str(result))+" Loops = "+alltrim(str(num_loops))) end
Also, when you develop a solution to the next puzzle, I suggest you learn how to "export" your script as a text file, and then simply attach it to a reply here. If you use the script export tool in Alpha Five the text file will be specially formatted to work with Alpha's import tool. This makes it easier for us to study your code and run it on our machines. We just import your previously exported script. To get to the export (and import) tools, save your script to the Code page of the A5 control panel. Then right click the script name. Choose Export off the drop down list (context menu).
Welcome to the board!
Comment