josh,
thank you for the response, and apologies for my delayed response. i thought i understood how the command line worked before all this.
i should say that this is all coding preference, but as you can imagine putting many loops into single lines of code so they can be executed can make for some ugly text.
when using the command prompt in unix/dos i can type ".run", then copy the multiple lines of code (minus any & or $ characters), then type "end" at the end, and all lines of code between the ".run" and "end" will be executed. i have tried this three ways in idlde with different results.
method 1: type ".run" at command line, highlight code to be executed, shift+f8, type "end" at command line. this prints "4" and "hello"
method 2: type ".run" at command line, highlight code to be executed, copy/paste code to command prompt, type "end" at command line. same outcome as method 1.
method 3: type ".run" at command line, highlight first line of code, copy/paste (or shift+f8) first line to command prompt, highlight second line of code, copy/paste (or shift+f8) second line of code to command prompt, repeat for lines 3 and 4, type "end" at command line. this time the result is "0", "hello", "1", "hello", "2", "hello", "3", "hello", each on it's own line.
so it seems to me that for some reason the copy/paste mechanism for pasting/executing multiple lines is different than for single lines. additionally, when used with idlde for 7.X method 2 gave the same results as method 3. this is weird.
gh
|