Skip to content

Pointer Dereference Issue with array of pointers #224

Description

@Schmitty2005
{$MODE ObjFPC}
program pnt;
uses sysutils;
const
   BlkSize = 12;

TYPE
  BufBlock   = ARRAY [0 .. BlkSize-1] OF Integer;
  Buffer     = ARRAY [0 .. 31] OF ^BufBlock;
var
    buf : Buffer;
    blk : BufBlock;
    x : Integer;
begin
    
    blk[0]:= 2;
    buf[0] := @blk;
    buf[0]^[1] := 12;
    x := buf[0]^[1];
    writeln(x);
end.

Compiles and works in FPC, but in Blaise :

$ ./blaise --source pnt.pas --output pnt
Parse error: Expected '.' or ':=' after subscript at line 19 col 11 in pnt.pas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions