User Activity

  • Posted a comment on discussion Help getting started on GnuCOBOL

    Sample program: recursive Fibonacci function. identification division. program-id. pmain. environment division. configuration section. repository. function fib-func. data division. working-storage section. 01 n binary-char unsigned. procedure division. 100-main. move 8 to n display "fibonacci(",n,"): ",fib-func(n) *> Works for n<=8. move 9 to n display "fibonacci(",n,"): ",fib-func(n) *> Segfaults due to underflow in function. display fib-func(7) *> Also segfaults. Function cannot handle numeric...

  • Posted a comment on discussion Help getting started on GnuCOBOL

    I understand. Thank you both for the input.

  • Modified a comment on discussion Help getting started on GnuCOBOL

    So, suppose I want to save a FLOAT-LONG to a file. Since COBOL does not support moving 64-bit floats to strings directly, I'd need to move them to an edited picture first. However, GNUCobol 3.2.0 does not allow me to use the 'E' character. Consider the sample program below: identification division. program-id. sample. data division. working-storage section. 01 n float-long. 01 numeric-edited-1 pic -9(15).9(15) . *> 01 numeric-edited-2 pic -9(1).9(15)E-99. procedure division. 100-main. move 3.4587124e-60...

  • Posted a comment on discussion Help getting started on GnuCOBOL

    So, suppose I want to save a FLOAT-LONG to a file. Since COBOL does not support moving 64-bit floats to strings directly, I'd need to move them to an edited picture first. However, GNUCobol 3.2.0 does not allow me to use the 'E' character. Consider the sample program below: identification division. program-id. sample. data division. working-storage section. 01 n float-long. 01 numeric-edited-1 pic -9(15).9(15) . *> 01 numeric-edited-2 pic -9(1).9(15)E-99. procedure division. 100-main. move 3.4587124e-60...

View All

Personal Data

Username:
niusrec
Joined:
2024-08-04 20:29:53.243000
Gender:
Male

Projects

  • No projects to display.

Personal Tools