Post Reply 
Real Variable
03-20-2015, 07:01 PM
Post: #1
Real Variable
Is it posible to declare a variable exclusive as a Real Variable as like in C

example : float c;

Cheers,

Jan
Find all posts by this user
Quote this message in a reply
03-21-2015, 09:18 AM
Post: #2
RE: Real Variable
(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".

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
03-21-2015, 12:27 PM
Post: #3
RE: Real Variable
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 :=).
Find all posts by this user
Quote this message in a reply
03-23-2015, 06:51 AM
Post: #4
RE: Real Variable
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
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)