HP Forums

Full Version: Real Variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it posible to declare a variable exclusive as a Real Variable as like in C

example : float c;

Cheers,

Jan
(03-20-2015 07:01 PM)Powersoft Wrote: [ -> ]Is it posible to declare a variable exclusive as a Real Variable as like in C

example : float c;

In Home and CAS, there is no need to declare a variable as real if you use one of the permanently built-in, non-purgeable variables A through Z and θ (Theta). By design, they can only contain reals.

In CAS only, assume(c, float) restricts 'c' to contain only reals. Note: you can also use DOM_FLOAT instead of float. They both mean "real".
assume(c,float) is an hypothesis, a special kind of assignation. It is used by the system to simplify re/im/conj(c). But it does not prevent assignation of any value to c later (regarding that aspect, assume does the same as :=).
Hello,

(03-20-2015 07:01 PM)Powersoft Wrote: [ -> ]Is it posible to declare a variable exclusive as a Real Variable as like in C

Nope, sorry, Apart from the 'build in', pre-created global variables, which you can not erase, you can not programaticaly, or otherwise do that.

Cyrille
Reference URL's