Talk:Parsing/RPN calculator algorithm: Difference between revisions

→‎Graduation to task: Single digit integers suffice for demonstration purposes.
(→‎Graduation to task: Single digit integers suffice for demonstration purposes.)
 
Line 4:
 
: Several programming examples are treating the input as characters instead of tokens, and this is working because there are no multi-digit numbers, and no numbers that contain a decimal point, and no numbers that are expressed in exponential notation (such as 3E27), and no numbers that have a leading sign, and no multi-character operands (such as '''**'''), etc. Should those programs be considered incorrect? (Just because they come up with the correct answer, doesn't make it correct. Hurrumph!) -- [[User:Gerard Schildberger|Gerard Schildberger]] 23:56, 14 December 2012 (UTC)
 
::The Fortran example contains the remark that dealing only with single-digit integers enables a simple scan, while a fuller multi-digit integer (or further, floating-point with exponent part) requires much more code which would obscure the presumed objective of exemplifying the parsing of RPN itself. I have a function EATREAL that takes 120 lines, while the task is achieved in less than fifty. As for revealing the state at each step, two statements: a WRITE and a FORMAT suffice. [[User:Dinosaur|Dinosaur]] ([[User talk:Dinosaur|talk]]) 10:49, 4 October 2016 (UTC)
 
== Extraneous Requirements ==
1,220

edits