Stuck in spin but I shouldn't be...
I'm learning spin and I've run across something that is driving me nuts. It's something that should work but doesn't.
So here goes...
Why does this work....
But when I move dms2dd to another file...
And modify the initial file to this...
It doesn't work. It doesn't error out, it just does nothing.
The 2 files are in the same directory.
Am I missing something obvious?
Thanks,
Rick.
So here goes...
Why does this work....
OBJ
system: "Propeller Board of Education"
pst : "Parallax Serial Terminal Plus"
f : "F32"
fs : "FloatString"
VAR
long dms[3]
PUB main
pst.clear
f.start
pst.newline
pst.str(fs.FloatToString(dms2dd(60, 30, 0)))
pst.newline
Pub dms2dd(degrees_in, minutes_in, seconds_in) : decimalDegrees
decimalDegrees := f.fadd(f.fadd(f.ffloat(degrees_in), f.fdiv(f.ffloat(minutes_in), 60.0)), f.fdiv(f.ffloat(seconds_in), 3600.0))
But when I move dms2dd to another file...
{conversions}
OBJ
f : "F32"
VAR
long dms[3]
Pub dms2dd(degrees_in, minutes_in, seconds_in) : decimalDegrees
decimalDegrees := f.fadd(f.fadd(f.ffloat(degrees_in), f.fdiv(f.ffloat(minutes_in), 60.0)), f.fdiv(f.ffloat(seconds_in), 3600.0))
And modify the initial file to this...
OBJ
system: "Propeller Board of Education"
pst : "Parallax Serial Terminal Plus"
f : "F32"
fs : "FloatString"
[COLOR=#a52a2a]cv : "conversions"[/COLOR]
VAR
long dms[3]
PUB main
pst.clear
f.start
pst.newline
pst.str(fs.FloatToString([COLOR=#a52a2a]cv[/COLOR].dms2dd(60, 30, 0)))
pst.newline
It doesn't work. It doesn't error out, it just does nothing.
The 2 files are in the same directory.
Am I missing something obvious?
Thanks,
Rick.

Comments