Real Variable - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Real Variable (/thread-3441.html) |
Real Variable - Powersoft - 03-20-2015 07:01 PM Is it posible to declare a variable exclusive as a Real Variable as like in C example : float c; Cheers, Jan RE: Real Variable - Joe Horn - 03-21-2015 09:18 AM (03-20-2015 07:01 PM)Powersoft Wrote: Is it posible to declare a variable exclusive as a Real Variable as like in 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". RE: Real Variable - parisse - 03-21-2015 12:27 PM 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 :=). RE: Real Variable - cyrille de brébisson - 03-23-2015 06:51 AM 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 |