Re: Fibonacci program



.. On 31.10.05
wrote jgavandeletethis@xxxxxxx (James J. Gavan)
on /COMP/LANG/COBOL
in obg9f.358464$oW2.190047@pd7tw1no
about Re: Fibonacci program


JJG> while (h1 < 50) {
JJG> System.out.println(hi);
JJG> hi = lo + h1; // new hi

Oops, where does the "h1" come from? It has not been declared, and
it is so easily to be confused with hl.

JJG> lo = hi - lo; /* new lo is (sum-old lo)
JJG> i.e., the old hi */

Why not a simple assignment instead of a computation?



Yours,
Lüko Willms http://www.willms-edv.de
/--------- L.WILLMS@xxxxxxxxxxx -- Alle Rechte vorbehalten --

Vorstellungen sind auch ein Leben und eine Welt. -G.C.Lichtenberg
.



Relevant Pages

  • Re: Making money from Java
    ... >> James J. Gavan wrote: ... > I think that is an excellent observation Alistair. ... > fascinating tradition without a monarchy. ...
    (comp.lang.cobol)
  • Re: OT : Formatting Messages
    ... James J. Gavan wrote: ... > I've just recently sent a message to Daniel on the topic OT: ... > cuff) which I typed directly into the message - for the most part that ...
    (comp.lang.cobol)
  • Re: Treeviews
    ... > James J. Gavan wrote: ... I think we should add a "Browse" button to the dialogue as well. ... use resource files when it comes to including a menu or a dialogue box ...
    (comp.lang.cobol)
  • Re: OT: US Presidents and Foreign Policy
    ... James J. Gavan wrote: ... >> Some interesting news, from none other than the Old Grey Liberal Lady... ... >> Seems precision weapons plants were dismantled and moved out of Iraq. ...
    (comp.lang.cobol)
  • Re: OT: Google Earth
    ... James J. Gavan wrote: ... Business ... > conjunction with GPS equipment. ...
    (comp.lang.cobol)