RosettaCodeData/Task/Even-or-odd/DCL/even-or-odd.dcl

9 lines
275 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
$! in DCL, for integers, the least significant bit determines the logical value, where 1 is true and 0 is false
$
$ i = -5
$ loop1:
$ if i then $ write sys$output i, " is odd"
$ if .not. i then $ write sys$output i, " is even"
$ i = i + 1
$ if i .le. 6 then $ goto loop1