| 1 |
*> { dg-do run } |
| 2 |
*> { dg-output-file "group2/Named_conditionals_-_fixed__float__and_alphabetic.out" } |
| 3 |
identification division. |
| 4 |
program-id. prog. |
| 5 |
data division. |
| 6 |
working-storage section. |
| 7 |
01 makeofcar pic x(10). |
| 8 |
88 volksgroup value "skoda", "seat", |
| 9 |
"audi", "volkswagen" |
| 10 |
false "boat". |
| 11 |
88 germanmade value "volkswagen", "audi", |
| 12 |
"mercedes", "bmw", |
| 13 |
"porsche". |
| 14 |
01 agegroup pic 999. |
| 15 |
88 child value 0 through 12. |
| 16 |
88 teen value 13 through 19. |
| 17 |
88 adult value 20 through 999. |
| 18 |
01 floats float-long. |
| 19 |
88 neg value -1 through -.1 . |
| 20 |
88 zed value zero . |
| 21 |
88 pos value .1 through 1.0 . |
| 22 |
procedure division. |
| 23 |
move "ford" to makeofcar |
| 24 |
display function trim (makeofcar) |
| 25 |
if volksgroup display " volksgroup" end-if |
| 26 |
if germanmade display " germanmade" end-if |
| 27 |
move "skoda" to makeofcar |
| 28 |
display function trim (makeofcar) |
| 29 |
if volksgroup display " volksgroup" end-if |
| 30 |
if germanmade display " germanmade" end-if |
| 31 |
move "volkswagen" to makeofcar |
| 32 |
display function trim (makeofcar) |
| 33 |
if volksgroup display " volksgroup" end-if |
| 34 |
if germanmade display " germanmade" end-if |
| 35 |
move 5 to agegroup. |
| 36 |
display agegroup with no advancing |
| 37 |
if child display " child" end-if |
| 38 |
if teen display " teen" end-if |
| 39 |
if adult display " adult" end-if |
| 40 |
move 15 to agegroup. |
| 41 |
display agegroup with no advancing |
| 42 |
if child display " child" end-if |
| 43 |
if teen display " teen" end-if |
| 44 |
if adult display " adult" end-if |
| 45 |
move 75 to agegroup. |
| 46 |
display agegroup with no advancing |
| 47 |
if child display " child" end-if |
| 48 |
if teen display " teen" end-if |
| 49 |
if adult display " adult" end-if |
| 50 |
move -0.5 to floats |
| 51 |
display floats with no advancing |
| 52 |
if neg display " minus" end-if |
| 53 |
if zed display " zero" end-if |
| 54 |
if pos display " plus" end-if |
| 55 |
move zero to floats |
| 56 |
display floats with no advancing |
| 57 |
if neg display " minus" end-if |
| 58 |
if zed display " zero" end-if |
| 59 |
if pos display " plus" end-if |
| 60 |
move 0.5 to floats |
| 61 |
display floats with no advancing |
| 62 |
if neg display " minus" end-if |
| 63 |
if zed display " zero" end-if |
| 64 |
if pos display " plus" end-if |
| 65 |
continue. |
| 66 |
quit. |
| 67 |
goback. |
| 68 |
end program prog. |
| 69 |
|