Silly question, but it has me befuddled. What is wrong with the following code?
prevclos = close(0,1,"us #f,d");
todopen = open(1,1,"us #f,d");
gap = (Math.abs(todopen-prevclos)>.49) ? true : false;
bstop = prevclos +.5;
sstop = prevclos - .5;
debugPrintln ("bstop: "+bstop+" sstop: "+sstop);
prevclos returns 106.969
sstop returns 106.469 as you would expect, but
bstop, instead of being 107.469 is 106.9690.5
So it seems as if I have some type mismatch, but where was it introduced? There are no other lines in the program as of yet - other than main() { and }
prevclos = close(0,1,"us #f,d");
todopen = open(1,1,"us #f,d");
gap = (Math.abs(todopen-prevclos)>.49) ? true : false;
bstop = prevclos +.5;
sstop = prevclos - .5;
debugPrintln ("bstop: "+bstop+" sstop: "+sstop);
prevclos returns 106.969
sstop returns 106.469 as you would expect, but
bstop, instead of being 107.469 is 106.9690.5
So it seems as if I have some type mismatch, but where was it introduced? There are no other lines in the program as of yet - other than main() { and }
Comment