Talk:Programming Fundamentals/Conditions/COBOL
Add topicAppearance
Latest comment: 4 years ago by Lbeaumont in topic Difficulties running this on the suggested development environments
Difficulties running this on the suggested development environments
[edit source]I ran this program on each of the three suggested development environments.
Both jDoodle and TutorialsPoint, returned syntax errors at line 30, and for each subsequent line that attempted to use SET to assign a string to the variable.
Example diagnostic output is:
jdoodle.cobc: in paragraph 'MAIN': jdoodle.cobc:30: error: SET target 'LABEL-IN' is not numeric, an INDEX or a POINTER jdoodle.cobc:31: error: SET target 'LABEL-OUT' is not numeric, an INDEX or a POINTER ...
The program did compile and execute in paiza.IO, however I could not figure out how to enter the inputs. Entering F and 20 alone on separate lines in the input tab window did not work. Thanks! --Lbeaumont (discuss • contribs) 15:15, 14 April 2020 (UTC)
- @Lbeaumont: Apparently, SET should only be used for numeric values. MOVE is used for text. Now corrected. For input, use something like:
F 100 F 100
- The input is used twice, once in the IF example and once in the EVALUATE example. Tested on all three environments. -- Dave Braunschweig (discuss • contribs) 16:11, 14 April 2020 (UTC)
- Thanks! --Lbeaumont (discuss • contribs) 15:44, 15 April 2020 (UTC)