Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Declaring Variables
#1
I am not sure what I am doing wrong. I initialize a variable int rpercent=0.25, then I did out rpercent and it gave me 0 instead of 0.25.
#2
int uses only "real" numbers, no decimals. for "3.005835" use double.
An old blog on QM coding and automation.

The Macro Hook
#3
Hello Ken:

Ok I tried:

Code:
Copy      Help
double npercent=0.005835
out npercent

and got "5.835e-003"
#4
yep, that's right. that's the computer world's equivilant of scientific notation.
An old blog on QM coding and automation.

The Macro Hook
#5
Oh so the "e" does not mean its an error then Tongue

Thank you


Forum Jump:


Users browsing this thread: 1 Guest(s)