Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Declaration of arrays
Thu, Dec 10 2015 6:00 AMPermanent Link

Ronald

Hi,

This declaration is accepted in the vars section:

CellColors      :array of integer=[0,$FF4BACC6,$FFF79646];

But this declaration is rejected with "Expected array of string but instead found" (no explanation of what the compiler DIDd find):

HTMLCellColors  :array of string=['0','#4BACC6','#F79646'];

What am I missing here?

Greetings,
Ronald
Thu, Dec 10 2015 4:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< What am I missing here? >>

Yeah, it looks a little wonky, but the issue is a combination of the fact that the parser has a preference for treating single-character strings as characters, not strings, and the fact that the first element of an array constant is used to determine the type of array.

A fix will be in 2.04, but for now just use this:

  HTMLCellColors  :array of string=[string('0'),'#4BACC6','#F79646'];

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Dec 11 2015 9:09 AMPermanent Link

Ronald

Ronald wrote:

Hi,

This declaration is accepted in the vars section:

CellColors      :array of integer=[0,$FF4BACC6,$FFF79646];

But this declaration is rejected with "Expected array of string but instead found" (no explanation of what the compiler DIDd find):

HTMLCellColors  :array of string=['0','#4BACC6','#F79646'];

What am I missing here?

Greetings,
Ronald


The compiler is definitly smarter then I am.
Image