richter asked:
> JX := LP + 28;
> where :
> JX is Real
> LP is Integer
> and i'm getting a 'Incompatible Types 'Integer' and 'Extended'
use
JX := LP + 28.0
instead. This will force LP to be promoted to a float so that it can be
added to the other float constant.
> I have an :
> NB : array[1..10,1..5,1..12] of Real;
> How can i manually set each value of the array ???
I'm not 100% sure what you mean here, but here's a few suggestions.
The following is the standard Delphi syntax for initialised arrays:
const
MyArray: array[1 .. 3] of Integer = (10, 20, 30);
To do a two dimentional array you bracket each subarray as follow:
const
My2DArray: array[1 .. 3, 1 .. 2] of Integer = ((10, 11),
(20, 21), (30, 31));
To do you 3D array is going to be a pig using this sort of syntax, but it
doable. The other possibility is to write some sort if initialisation
routine that takes the data from some other initialised arrays and stuffs
it into the main array as appropiate.
> In the old TurboBasic, we had the CDBL declaration, is there a
> similar in Delphi ???
I'm guessing that CDBL is standsrd for "C format double precision float"
and these are declared in Delphi as Double.
All these questions and more are documented in the Object Pascal reference
manual that comes with Delphi. I suggest that you have a good study of
this as it will save you a lot of time in the future if you know all of
the capabilities of the Object Pascal language.
Cheers, Max.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz