Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Variadic-function/XPL0/variadic-function.xpl0
Normal file
12
Task/Variadic-function/XPL0/variadic-function.xpl0
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
include c:\cxpl\codes; \intrinsic 'code' declarations
|
||||
def IntSize=4; \number of bytes in an integer
|
||||
|
||||
proc Var(N...); \Display N strings passed as arguments
|
||||
int N;
|
||||
[N:= Reserve(N*IntSize); \reserve space for N string pointers
|
||||
repeat Text(0,N(0)); CrLf(0); \display strings pointed to by N(0)
|
||||
N:= N+IntSize; \point to next string
|
||||
until N=GetHp; \pointing beyond reserved space?
|
||||
];
|
||||
|
||||
Var(4, "Mary", "had", "a", "little")
|
||||
Loading…
Add table
Add a link
Reference in a new issue