Hi all,
I have a problem with the FloatToString$ function.
It seems to work OK until the argument to FloatToString$ is larger than 32k.
Above a value of 32k, incorrect values are printed.
Is there a limit to the FloatToString$ function preventing it to convert values above 32k?
jan
FloatToString$ issue
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: FloatToString$ issue
Hi Jan,
Which version of Flowcode are you using?
V4 and V5 use a 16-bit signed variable for the whole portion of the number which only allows 0 to 32657
In v4 you can edit this by opening the internals.h file in the FCD folder and editing this line in the FCI_FLOAT_TO_STRING function code.
to this to get 0 - 65535
or you could use the following in v5 to get an even larger range.
In v5 the file to edit is the PIC_CAL_STRING.c file in the "CAL/PIC" folder.
Which version of Flowcode are you using?
V4 and V5 use a 16-bit signed variable for the whole portion of the number which only allows 0 to 32657
In v4 you can edit this by opening the internals.h file in the FCD folder and editing this line in the FCI_FLOAT_TO_STRING function code.
Code: Select all
int whole;Code: Select all
unsigned int whole;Code: Select all
long whole;Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel