Data update

This commit is contained in:
Ingy döt Net 2024-11-04 20:28:54 -08:00
parent 52a6ef48dd
commit 157b70a810
604 changed files with 14253 additions and 2100 deletions

View file

@ -1,16 +1,13 @@
# operator that executes a procedure the specified number of times #
OP REPEAT = ( INT count, PROC VOID routine )VOID:
TO count DO routine OD;
BEGIN
# operator that executes a procedure the specified number of times #
OP REPEAT = ( INT count, PROC VOID routine )VOID: TO count DO routine OD;
# make REPEAT a low priority operater #
PRIO REPEAT = 1;
# make REPEAT a low priority operater #
PRIO REPEAT = 1;
# can also create variant that passes the iteration count as a parameter #
OP REPEAT = ( INT count, PROC( INT )VOID routine )VOID:
FOR iteration TO count DO routine( iteration ) OD;
main: (
# can also create variant that passes the iteration count as a parameter #
OP REPEAT = ( INT count, PROC( INT )VOID routine )VOID:
FOR iteration TO count DO routine( iteration ) OD;
# PROC to test the REPEAT operator with #
PROC say something = VOID: print( ( "something", newline ) );
@ -18,8 +15,9 @@ main: (
3 REPEAT say something;
# PROC to test the variant #
PROC show squares = ( INT n )VOID: print( ( n, n * n, newline ) );
PROC show squares = ( INT n )VOID:
print( ( whole( n, 0 ), " ", whole( n * n, 0 ), newline ) );
3 REPEAT show squares
)
END