Article View: comp.sys.intel
Article #281Re: PLM vs. C for 80286/80386
From: alfred
Date: Wed, 14 Jun 1989 18:50
Date: Wed, 14 Jun 1989 18:50
25 lines
1508 bytes
1508 bytes
> It's been a while since I've used PL/M, so I may not have the syntax
> quite right, but you can implement variable arguments by passing pointers:
>
> call Printf ("format string", @(arg1, arg2, etc));
For your information, you no longer need to do that with PL/M-n86 V3.3,
under this version, you can call any C-interfaced function with variable
parameters (similar to ANSI-C function prototype with ellipses):
$interface (C=printf)
foo: do;
printf: procedure (p) external;
declare p pointer;
end;
proc: procedure (a,b) public;
declare (a,b) word;
call printf(@('A = %d, B = %d'), a, b); /* LEGAL NOW */
end;
end;
In this case, type checking will be carried out for the first
argument only, extra arguments in the actual call will not be checked.
The extreme case will be declaring a C external function with no
argument, then you can call that function with any number of parameter.
Technical Details
Message-ID:
<230@guardian.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!husc6!ogccse!littlei!guardian!alfredReferences:
<598@philtis.UUCP> <126@tridom.uucp> <409@nbires.nbi.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!husc6!ogccse!littlei!guardian!alfred From: alfred@guardian.UUCP (alfred) Newsgroups: comp.sys.intel Subject: Re: PLM vs. C for 80286/80386 Keywords: PLM C Message-ID: <230@guardian.UUCP> Date: 14 Jun 89 18:50:36 GMT References: <598@philtis.UUCP> <126@tridom.uucp> <409@nbires.nbi.com> Reply-To: alfred@.UUCP (Alfred Huang) Organization: Intel Corp., Development Tools Operation Lines: 25