gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] TestCase21


From: Dragiša Durić
Subject: [Gm2] TestCase21
Date: Fri, 17 Dec 2010 12:21:36 +0100

Happens when argument is single-char ARRAY OF CHAR... Insert space is quick fix.

% gm2 -I../../gm2.lib0 -fiso -c TestCase21.mod          
TestCase21.mod: In function ‘_M2_TestCase21_init’:
TestCase21.mod:9: error: invalid lvalue in unary ‘&’

MODULE TestCase21;

IMPORT
  MakeArgs;

VAR
  args: MakeArgs.Args;

BEGIN
  args := MakeArgs.Do("\n");
END TestCase21.

DEFINITION MODULE FOR "C" MakeArgs;

FROM
  SYSTEM
IMPORT
  ADDRESS;

EXPORT QUALIFIED Args, Do, ByNumber, Free;

TYPE
  Args = POINTER TO RECORD
    format: POINTER TO ARRAY [0..2047] OF CHAR;
    count: CARDINAL; (* SIZE() == SIZE(ADDRESS) *)
    params: ARRAY [0..127] OF ADDRESS;
  END;

PROCEDURE Do (format: ARRAY OF CHAR; ...): Args;

PROCEDURE ByNumber(argCount: CARDINAL; ...): Args;

PROCEDURE Free (args: Args);

END MakeArgs.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]