Welcome to Phrogram Sign in | Join | Help


Re: Define xx as Decimal [] = {0,0.0}

  •  10-16-2006, 9:47 AM

    Re: Define xx as Decimal [] = {0,0.0}

    OK, you are correct in what your saying to a point, the example is correct, you can load an array with values when you define it, you can't leave the definition incomplete, so by defining an array and then loading it with values the system in setting the size of the array equal to the numbers of values you are loading.

    Also Phrogram is hard typed, that means a data type like Decinal expects a decimal value to be entered as a value, if you define the array type as an integer then you don't need the decimal point in the value.

    so:

    Define AnotherDecimal As Decimal [] = {1.0 ,1.1, 2.2, 3.3}

    Define AnotherInteger As Integer[] = {1 ,1, 2, 3}

    Both work fine because the data matches the data type of the definition.

    Thanks

    Filed under: , ,
View Complete Thread