
-----------------------------------
uknown blank
Mon Jan 18, 2010 6:25 pm

Creating a Simple Error Trap
-----------------------------------
What is it you are trying to achieve?


How do you create an error trap.
Can someone please give me a simple example. 
This is what i have so far strintok and strint but i need one for real numbers and integers

-----------------------------------
TheGuardian001
Mon Jan 18, 2010 6:54 pm

Re: Creating a Simple Error Trap
-----------------------------------
All valid integers can be stored as real numbers with intreal (no error check needed).

Real numbers can be safely converted to an int by rounding (no error check needed).

-----------------------------------
andrew.
Mon Jan 18, 2010 8:03 pm

RE:Creating a Simple Error Trap
-----------------------------------
So to sum it up:

String -> Int check: strintok
String -> Int: strint
String -> real check: strrealok
String -> real: strreal
real -> String: realstr
Int -> String: intstr
Int -> Real: intreal
Real -> Int: round
