USE complex
USE rtchecks
INTEGER common
INTEGERARRAY = ARRAY(10) OF INTEGER
REAL FUNCTION PRN(INTEGERARRAY AAA^)
INTEGER common = 3
LOOP FOR i=1 TO 10
POINTER INTO AAA(ABS(1)+*),AAA ii=i
DO WRITE AAA(i)AAA(ii+2),AAA(ii+ABS(1)) FOR ii=3 TO 5
AAA=~+AAA+~
AAA(i)=AAA(i)+10
WRITE AAA(i) ./.
AAA(i)=3*~
WRITE ,AAA[ABS(1)+ii] ./.
AAA(i)=~*3
WRITE ,AAA(i)
REPEAT LOOP
END PRN
REAL FUNCTION PRN(INTEGER x)
BOOLEAN b
CHAR s(20)
s(1)="c"
READ b,s(0),s
IF "a" IN s THEN WRITE x
RESULT=1^x + EXP(0)
END PRN
TYPEOF(PRN) ff
ff=PRN
INTEGER ROW(10)
LOOP FOR i=1 TO 10; ROW(i)=i; REPEAT LOOP
b=PRN(ROW)
a=PRN(3)
c=SQRT( PI * ROW(1) )
bc=b
LOOP FOR n IN (1,2,4); WRITE n; REPEAT LOOP
DO WRITE n FOR n IN ROW
d=(SUM n FOR n IN ROW) + (PRODUCT n FOR n IN (1,2,3)) + (MAX n FOR n IN ROW)
READ ROW
ROW(3)=~+2+ABS(~)
INTEGER MA(1..3,1..3)=((1,2,3),(4,5,6),(7,8,9))
TYPE substruct=STRUCTURE(INTEGER i1=4,i2)
object=STRUCTURE(
substruct
SUBROUTINE(REAL distance) move
INTEGER i3=2
ARRAY(3..4) OF REAL a34
INTEGERARRAY
)
POINTER TO object AA,BB
object A,B
substruct C(10)
WRITE C
WRITE AA=B,A=B,A=BB,AA=BB
move(A,3)
WITH A: i1=i3
REAL xx
SINGLE yy=SINGLE(953)
A=BINARY object FROM stdin
A.i1=INTEGER FROM stdin
A.a34=(3,4)
WRITE A.a34
CHAR ch = CHAR FROM stdin
ARRAY(20) OF CHAR nome = "ciao"
ARRAY(20) OF STRING list
cnome="ciaociao"
ccnome=WRITE("ciaociao" ch)
cccnome="ciaociao" ch
list(1)=cnome
list(2)=ccnome
list(3)=WRITE("y=" yy)
READ "y=" yy
WRITE A.i1, A.i3, C.i1
READ substruct AA, INTEGERARRAY B
WRITE BINARY TO stdout A, INTEGERARRAY BB, SINGLE(xx)
READ BINARY FROM stdin object A, ROW, yy
WRITE BY NAME A.i3
READ BY NAME A.i1, yy
FILE OF REAL file
SUBROUTINE opensub(CHAR fil(*))
CREATE(file,fil)
END opensub
opensub(WRITE("randfile" A.i1 nome ch))
file(3)=5
file(2)=file(3)+1
file(1)=xx
fflush(file)
FILE OF ARRAY(1..10) OF REAL fa
fa=CREATE("farr")
NEW fa
WRITE fa(2,4)+1
fa(2,4)=10
FREE fa
fb=CREATE("fb")
WRITE TO fb fa(1)
FLUSH fb
CLOSE fb
SUBROUTINE do(REAL mat^(*,*); SUBROUTINE(REAL x^(*,*)) something)
something(mat)
END do
POINTER TO sometype FUNCTION Copy(POINTER TO sometype sp^)
RESULT=sp
END Copy
POINTER TO INTEGER A1,B1
A1=Copy(B1)
nx=4; INTEGER CONSTANT nz=BINARY INTEGER FROM stdin
ASK INTEGER ny
T=STRUCTURE(ARRAY(ny) OF REAL x,y)
T arrs
POINTER TO T q
q=NEW T
T FUNCTION prova(INTEGER x)
RESULT.x(3)=x
END prova
q^=prova(3)
FREE q
q8=prova(3)
T1=STRUCTURE(INTEGER CONSTANT ly; POINTER TO ARRAY(ly) OF REAL x)
T1(15) q1
NEW q1.x
y1=q1.x(3)*q1.x.HI
FREE q1.x
T2=STRUCTURE(INTEGER CONSTANT ly; ARRAY(ly) OF REAL x)
T2(15) q2
y2=q2.x(3)*q2.x.HI+q2.ly
POINTER TO T2 q3=NEW T2(21)
q3.x(4)=q3.x(3)*q3.ly
q3=q2
q2=q3
VELOCITY=STRUCTURE(COMPLEX u,v,w)
VELOCITY V(0..nx,-1..ny+1,-nz..nz)
VEL_ARRAY=ARRAY(0..nx,1..ny-1,-nz..nz) OF VELOCITY
FILE OF VEL_ARRAY media=CREATE("media")
VEL_ARRAY mediabuf=media(4)
LOOP FOR ALL i,j,k WITH mediabuf(i,j,k)
u=~+V.u(i,j,k)
REPEAT
media(4)=mediabuf
media(4).v=~+V.v
WITH media(4): w=V.w
SUBROUTINE Copy(COMPLEX aa(*,*); POINTER TO ARRAY(*,*) OF VELOCITY bb)
bb.u=aa
END Copy
Copy(media(1,2,*+3,*).u,V(*,2,*))
ST=POINTER TO STORED STRUCTURE(INTEGER i,j; COMPLEX k; ARRAY(*) OF VEL_ARRAY mm)
ST med
CREATE(med,"med")
WRITE med.i, med.j
WITH med: k=1; mm(4,5,6,7).u=mm(6,7,8,9).v+1
SUBROUTINE Copy(ST aa; POINTER TO ARRAY(*,*) OF VELOCITY bb)
bb.u=aa.mm(1,2).v
END Copy
Copy(media(1,2,*,*).u,V(*,2,*))
SUBROUTINE invert(FUNCTION(REAL x)->REAL f; REAL y)
END invert
INLINE REAL FUNCTION sq(REAL x)=x*x
invert(LOG,6)
invert(sq,3)
VECTOR=ARRAY(1..3) OF COMPLEX
POINTER TO ARRAY(*) OF COMPLEX FUNCTION u(VECTOR VV^(*))=VV(*,1)
INLINE POINTER TO ARRAY(*) OF COMPLEX FUNCTION v(VECTOR VV^(*))=VV(*,2)
LOOP bla
WRITE "bla"
IF YES THEN EXIT bla
REPEAT bla
LOOP bli
REPEAT bli FOR j=1 TO 10 AND i=1 TO j
LOOP ble
k=4
REPEAT ble WHILE k>5
LOOP blo
WRITE "blo"
REPEAT blo UNTIL READ FROM stdin common
INLINE LOOP FOR i IN (3,5,7)
WRITE i
REPEAT
C SECTION
int prova(double x1, int *x2, float x3[], char x4[]){
}
END C SECTION
SINGLE a1
INTEGER b2
SINGLE c3(10)
CHAR d4(20,10-1)
d4(1)="ciao"
prova(a1,b2,c3,d4(0))
WRITE a1:1.4,b2:2.8
DEFAULTFORMAT 1.10
WRITE a1,b2
SUBROUTINE fff{FUNCTION()->ARRAY(*) OF REAL ggg}
REAL t(3)
t=ggg()
END fff
STRING st
st="abc"
st="" st a1
WRITE st(15)
INLINE ARRAY(arg.HI) OF REAL FUNCTION provaarr(REAL arg(*))
DO RESULT(i)=i*arg(i) FOR i=0 TO arg.HI
END provaarr
WRITE provaarr((1.2,3.4,5.6,7.8))
SUBROUTINE testopt[REAL x; OPTIONAL REAL y=0,z=3*SIN(x)]
WRITE x+y+z
END testopt
testopt(3)
testopt(2,z=4)
testopt(1,z=4,y=3)
INTEGER(1..5) ri
LOOP FOR ALL ri
IF ri+1 > HI THEN WRITE ri
REPEAT
CHAR FUNCTION blip[INTEGER(5..10) i]=st(i)
WRITE blip(LO)
DO WRITE blip(i) FOR ALL i