help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Type declarations of variables


From: Maarten D. de Jong
Subject: Type declarations of variables
Date: Sun, 19 Feb 2006 16:12:34 +0100 (CET)
User-agent: SquirrelMail/1.4.5

Am I correct in assuming that if I want to assign a specific type to a
variable before I begin calculations, I have to do so in a dynamic way? In
other words, if I want a new global matrix M to consist of int64's, I
always have to call onto the int64() *function* to make it happen, like
so:

global M = int64([]);

I cannot write (as would be customary in many programming languages):

global int64 M = [];

I know that with a language as dynamic as Octave there is very little
difference between the two forms---even internally---but coming from a
programming background, I have a slight preference for the second syntax.
Since that doesn't work in Octave, I was wondering whether that is by
design, or that I am genuinely overlooking something.


With kind regards,
Maarten



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]