When I store a floating point number( such as 1,5 or 1.5) Picbasic erase the numbers after comma
is it picbasic's fault or Pic's fault??
When I store a floating point number( such as 1,5 or 1.5) Picbasic erase the numbers after comma
is it picbasic's fault or Pic's fault??
Electrical & Electronic Engineering
Undergraduate Student
No,
Just programmer's fault who hasn't read his manual at all ...
Where did you find PbP was using directly floating point numbers ??? Probably on another forum.
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I think I couldn't explain my problem
I know this because of my poor english...
When I store 655/10 to a variable and I write it in lcdout command it shows only 65
I thought that pbp shows only number that are located before comma but when I product this variables with 100, at this time it showed 650
Did you understand now?? I'm so bored, I tend to give up using pbp...
because I saw that I can set variables as double or float in pic c...
I don't want to stop using pbp heeelllppp...!!!!
my pbp version:2.47
mcs version 3.0.0.0
Electrical & Electronic Engineering
Undergraduate Student
I designed a code that takes a numeric variable such as 12.34. But when I put it a var. picbasic takes it as "12" !!!
Anybody can solve this problem??
Electrical & Electronic Engineering
Undergraduate Student
in other word;
how can I define double var. and use it in picbasic freely??
Electrical & Electronic Engineering
Undergraduate Student
I comprehend that I must use 12.34 as 1234 and when I am using I must divide it 100.....![]()
Problem solved I wish I use 12.34 directly but....
Thanks![]()
Electrical & Electronic Engineering
Undergraduate Student
Bookmarks