24 game/ABAP: Difference between revisions
m
Fixed syntax highlighting.
m (→RPN Code: Left off closing tag.) |
m (Fixed syntax highlighting.) |
||
Line 3:
Firstly we need to make a Reverse Polish Notation parser. To make it easier, I simply put this in the report used in the game itself. The following data declarations should be common to both for ease of use.
===Global Data===
<
constants: c_eval_to type i value 24,
c_tolerance type f value '0.0001'.
Line 9:
gv_val type f,
gv_pac type p,
gv_chk type c.</
===RPN Code===
<
form rpn_log using lv_msg type string.
write : / 'RPN Message: ', lv_msg.
Line 183:
ev_out = 'X'.
endform.</
===24 Game===
Line 190:
The supplied Random Number Generator seems to highly favour a five as the first digit as well (It does occasionally take on other values). It doesn't appear to be a seeding issue, as the other numbers appear sufficiently random.
<syntaxhighlight lang="abap">
selection-screen begin of block main with frame title lv_title.
parameters:
Line 328:
importing
ran_int = ev_val.
endform.</
|