AIFPORTOPEN problem -- I followed the examples in the AIF manual
(programming examples) on how to open a port. Something isn't right.
Here's the example:
$sysintr 'sysintr.pub.sys'$
procedure GETPRIVMODE ; intrinsic;
procedure HPGETPROCPLABEL ; intrinsic;
procedure GETUSERMODE ; intrinsic;
$sysintr 'aifintr.pub.sys'$
procedure AIFPORTOPEN ; intrinsic;
PROCEDURE aif_port_open(var overall_status:status_type;
var proc_number :shortint);
label 999;
begin
GETPRIVMODE;
overall_status.all := 0;
portname := 'chatport1';
portpass := 'chatpass';
accessmode := 1;
itemnum_ports := init_itemnum_array;
item_ports := init_item_array;
item_status_ports := init_item_status_array;
createoptions := 2;
maxmsgsize := 80;
itemnum_ports [1] := 11201;
item_ports [1] := addr(createoptions);
itemnum_ports [2] := 11202;
item_ports [2] := addr(maxmsgsize);
proc_name := '#PORTHANDLER#';
proc_file := '#ASYNC1#';
user_id := 0;
HPGETPROCPLABEL(proc_name,
createhandler,
overall_status,
proc_file,
False);
if overall_status.all <> 0 then
begin
proc_number := 1;
goto 999;
end;
itemnum_ports [3] := 11206;
item_ports [3] := addr(createhandler);
itemnum_ports [4] := 11207;
item_ports [3] := addr(createstate);
port_id1 := 0;
port_id2 := 0;
port_id1 := AIFPORTOPEN(overall_status,
portname,
portpass,
accessmode,
user_id,
itemnum_ports,
item_ports,
item_status_ports);
All parameters are defined in the Pascal program correctly.
However, when I compile the program I get this syntax error:
pasxl aifports.source,aifports.nmobj,$null
PAGE 1 HP PASCAL/iX HP31502A.05.01 COPYRIGHT HEWLETT-PACKARD CO.
1986
SUN, NOV 9, 2003, 5:39 PM
FILE: AIFPORTS.SOURCE.E3K
31 97.000 1 port_id1 := AIFPORTOPEN(overall_status,
^
**** ERROR # 1 INVALID USE OF PROCEDURE OR FUNCTION IDENTIFIER (202)
NUMBER OF ERRORS = 1 NUMBER OF WARNINGS = 0
PROCESSOR TIME 0: 0: 0 ELAPSED TIME 0: 0: 0
NUMBER OF LINES = 116 LINES/MINUTE = 15398.2
NUMBER OF NOTES = 0
pascalxl.PUB.SYS "",7
Program terminated in an error state. (CIERR 976)
ERRORS IN COMPILE
setjcw jcw=fatal
Unless a CONTINUE is in effect, the remainder of the
current UDC will be flushed. (CIWARN 1723)
Does anyone have a clue what is wrong?
Thanks in advance.
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|