Help for double variable...

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
Wolfgang Kos
Posts: 21
Joined: Wed Jun 19, 2013 8:43 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Help for double variable...

Post by Wolfgang Kos »

Hello,
I have a Problem with double variable from external C-Code.
The external C-Code is insert with include.

The double variable for speed like this:

extern double speed_external;
the value is like 0.0

Then I insert C-Code in flowcode like this why i will see the speed on display:
C-Code.jpg
C-Code.jpg (24.31 KiB) Viewed 5301 times
and I becomes this error:
Error.jpg
Error.jpg (32.28 KiB) Viewed 5301 times
What can I do?
When I delete this C-Code, all is good, other function on the external Code will function good.

Thank you for all Infos.

Wolfgang

User avatar
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: Help for double variable...

Post by Benj »

Hi Wolfgang,

Please can you post a program that demonstrates this and we will investigate for you. It's usually down to something minor.

Wolfgang Kos
Posts: 21
Joined: Wed Jun 19, 2013 8:43 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Help for double variable...

Post by Wolfgang Kos »

Hell Benj,

thank you for you answer, I will look for code, is very difficult many files :-)

I can read the variable now, I make it in external code when I will see the variable like this Value=5.5 I only see Value=5
Is think the variable is bad defined from me.

How I must defined from typ double variable in Flowcode ???

User avatar
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: Help for double variable...

Post by Benj »

Hi Wolfgang,

It depends on which micro you're using but a double is often defined as a single precision float.

How are you printing out the value?

Wolfgang Kos
Posts: 21
Joined: Wed Jun 19, 2013 8:43 am
Has thanked: 2 times
Been thanked: 3 times
Contact:

Re: Help for double variable...

Post by Wolfgang Kos »

H Benj,

I solved the problem, I find in Flowcode this code:

float2int() and FloatToString$()

very good...

Post Reply