PST/Float32Full problem (beginner)
egenriether
Posts: 29
I'm new to the prop and I'm having a problem printing a number to the pst. In the code below, If I don't include the line
number := F.FRound(F.FMul(tDecay,100))
then the pst will show the string that follows and the value "0" for "number", as I would expect. When I include the line with the F.FRound command (or any Float32Full command) the rest of the code doesn't get processed and the pst is blank. Am I somehow upsetting the pst code or misusing the Float32 code? This is not the only instance this has happened to me (a lot of things I do tend to make pst stop working) but I've tried to distill it down to the basic problem without a lot of other stuff to confuse the issue.
Thanks
--Brian
number := F.FRound(F.FMul(tDecay,100))
then the pst will show the string that follows and the value "0" for "number", as I would expect. When I include the line with the F.FRound command (or any Float32Full command) the rest of the code doesn't get processed and the pst is blank. Am I somehow upsetting the pst code or misusing the Float32 code? This is not the only instance this has happened to me (a lot of things I do tend to make pst stop working) but I've tried to distill it down to the basic problem without a lot of other stuff to confuse the issue.
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 var long tDecay long number obj rc : "RCTIME" pst: "Parallax Serial Terminal" F: "Float32Full" PUB Go pst.Start(115200) repeat waitcnt(clkfreq/10 + cnt) rc.rctime(18, 1, @tDecay) number := F.FRound(F.FMul(tDecay,100)) pst.Str(String(pst#CE, pst#HM, "tDecay = ")) pst.Dec(number)
Thanks
--Brian
Comments
-Brian
Have you checked out F32? It has more features than Float32 and is faster. I don't know if the latest version is in the OBEX yet but it can be found here.
It's a drop in replacement for Float32.