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
If you read the PBP Manual you will discover it only handles INTEGERS.
If you have a BYTE, your numbering is 8 bits from 0-255 (NO DECIMAL PLACES)...
If you have a WORD, your numbering is 16 bits 0-65535 (NO DECIMAL PLACES)...
If you lave a LONG etc etc the rest is in your documentation.
Theis does not mean you can't do Floating Point Math, but it means you have to stay within the limitations of the variables that you are using. If you want two decimal places precision example 12.34 then you must store it as 1234 and insert the Decimal Point accordingly when you need to Display or Print your variable.
Bookmarks