Re: ever seen array(.j.) notation? what's array(.j,k.) mean?


[ Delphi Forum -- by DelphiLand ]

Posted by webmaster Guido on October 26, 2003
In Reply to: ever seen array(.j.) notation? what's array(.j,k.) mean? posted by oatmealface on October 25, 2003

: i recently downloaded a chunk of pascal/delphi code and discovered this bizzare notation - array(.j.) appears to refer to the jth element of an array. i understand array[j] and its extensions, but i can't figure what array(.j, k.) might refer to if it isn't array[j,k]

: anybody know where this very odd notation comes from and what it means?
----------

In Object Pascal code, a few character pairs are equivalent to other characters:

(. is equivalent to [
.) is equivalent to [
(* is equivalent to }
*) is equivalent to }

Example:

{ You can code it this way }
A[1] := 10;
B[1, 2] := 20;

(* You can also code it as follows *)
A(.1.) := 10;
B(.1, 2.) := 20;

The reason probably is, that on some keyboards the characters [ ] { } can be difficult to reach, or even are not available on the keyboard.


[ Delphi Forum ] [ DelphiLand: free Delphi source code, tips, tutorials ]