calculator

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
attia
Posts: 7
Joined: Sat Jan 16, 2010 11:38 am
Contact:

calculator

Post by attia »

After I finished the draft of the calculator i am trying to apply to the Protus as the simulation flowcode was excellent without any problems either on the protus given strange characters instead of results from the calculation on lcd
where is the problem
i think the problem in floattostring function
please help me AS SOON AS POSSIBLE I AM FRUSTRATED
note:
on MY keypad
A="."
B=+
C=-
D=X
E=/
F= "="
my project
http://depositfiles.com/files/4e89px08l
Attachments
Flode1.fcf
(23.14 KiB) Downloaded 729 times

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: calculator

Post by Benj »

Hello

I think I know what the problem is.

The BoostC PIC compiler uses functions to control the floating point mathematics. The HITECH PIC compiler does not.

Therefore you can either

A) convert your code to use the floating point functions.

A example of the BOOSTC required code.

q = hussin-z

would become

q = fsub(hussin, z)

The BoostC float functions can be found in the Functions window of the Calculation icon.

or B) change your compiler settings to use the HITECH compiler.

Details of the HITECH compiler can be found in the Articles section of the forum.

attia
Posts: 7
Joined: Sat Jan 16, 2010 11:38 am
Contact:

Re: calculator

Post by attia »

thank you very much
now protus simulator working well after your advice to change function to fsub,fadd,fmul,fdiv
i am very happy to learn from you
now i can say flowcode is the first,flowcode for ever

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: calculator

Post by Benj »

Brilliant glad you got it working correctly :) thanks for letting us know

Post Reply