Time for an 2014 update…

This commit is contained in:
Ingy döt Net 2014-01-17 05:32:22 +00:00
parent 372c577f83
commit 09687c4926
2520 changed files with 34227 additions and 7318 deletions

View file

@ -0,0 +1,16 @@
>>SOURCE FREE
IDENTIFICATION DIVISION.
PROGRAM-ID. random-element.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 nums-area VALUE "123456789".
03 nums PIC 9 OCCURS 9 TIMES.
01 random-idx PIC 9 COMP.
PROCEDURE DIVISION.
COMPUTE random-idx = FUNCTION RANDOM(FUNCTION CURRENT-DATE (9:7)) * 9 + 1
DISPLAY nums (random-idx)
.
END PROGRAM random-element.

View file

@ -0,0 +1,5 @@
(defvar *list* '(one two three four five))
(print (nth (random (length *list*)) *list*))
(print (nth (random (length *list*)) *list*))
(print (nth (random (length *list*)) *list*))

View file

@ -1 +1 @@
print choose [ "one" "two" "chicken" ]
!print choose [ "one" "two" "chicken" ]

View file

@ -0,0 +1,2 @@
a := [2, 9, 4, 7, 5, 3];
Random(a);

View file

@ -0,0 +1,2 @@
array = [1,2,3]
array[rand(1:length(array))]