UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
Example In the following example, the program segment first uses the ECL T.ATT command to reserve tape unit 0 and specifies no conversion code. Then a routine reads all the records on the tape (until the end of the file or tape) and calls an internal subroutine that processes the record. After the process is finished, the REWIND command rewinds the tape. 1-692 UniBasic Commands Reference PERFORM "T.ATT DO" DONE = 0 LOOP READT UNIT (00) TAX.RECORD ELSE DONE = 1 UNTIL DONE DO GOSUB PROCESS.RECORD REPEAT REWIND UNIT (00) ELSE PRINT 'REWIND UNSUCCESSFUL' Related Commands UniBasic READT, RESIZET, WRITET UniData SETTAPE, T.ATT, T.DET – For information, see the UniData Commands Reference.
RND Syntax RND(num.expr) Description The UniBasic RND function returns a random integer from 0 through num.expr minus 1. Example In the following example, the program statement prints a random number from 0 through 9: PRINT RND(10) Related Command UniBasic RNDSEED RND 1-693
- Page 684 and 685: Example In the following example, t
- Page 686 and 687: Parameters The following table desc
- Page 688 and 689: Related Commands UniBasic CLOSE, DE
- Page 690 and 691: Parameter Description Examples In t
- Page 692 and 693: READVL Syntax READVL var FROM [file
- Page 694 and 695: Example In the following example, R
- Page 696 and 697: Parameters The following table desc
- Page 698 and 699: READXBCK Syntax READXBCK dyn.array.
- Page 700 and 701: READXFWD Syntax READXFWD dyn.array.
- Page 702 and 703: ReadXMLData Syntax ReadXMLData(xml_
- Page 704 and 705: RECORDLOCKED Syntax RECORDLOCKED (f
- Page 706 and 707: STATUS Function Return Values After
- Page 708 and 709: Parameter Description Examples In t
- Page 710 and 711: RECORDLOCKU Syntax RECORDLOCKU [fil
- Page 712 and 713: RELEASE Syntax RELEASE [file.var [,
- Page 714 and 715: ReleaseXML Syntax ReleaseXML(XMLhan
- Page 716 and 717: Example In the following example, c
- Page 718 and 719: Parameter Description The SETTING c
- Page 720 and 721: In some implementations, the values
- Page 722 and 723: REMOVE Syntax REMOVE(dyn.array.var,
- Page 724 and 725: REPLACE Syntax REPLACE(dyn.array.ex
- Page 726 and 727: In the next example, the program se
- Page 728 and 729: RESIZET Syntax RESIZET [UNIT(mu.exp
- Page 730 and 731: RETURN Syntax RETURN [TO label[:]]
- Page 732 and 733: Examples In the following example,
- Page 736 and 737: RNDSEED Syntax RNDSEED expr Descrip
- Page 738 and 739: SADD Syntax SADD(x, y) Description
- Page 740 and 741: The following table describes the s
- Page 742 and 743: Example In the following example, t
- Page 744 and 745: SELECT Syntax SELECT file.var [TO {
- Page 746 and 747: Examples The following program segm
- Page 748 and 749: SELECTINDEX Syntax SELECTINDEX inde
- Page 750 and 751: Related Commands UniBasic DELETELIS
- Page 752 and 753: Related Commands UniBasic DELETELIS
- Page 754 and 755: Note: SEND with the X option suppre
- Page 756 and 757: SEQS Syntax SEQS("char.expr") Descr
- Page 758 and 759: The following table describes the s
- Page 760 and 761: Parameters The following table desc
- Page 762 and 763: The following table describes the s
- Page 764 and 765: setHTTPDefault Syntax setHTTPDefaul
- Page 766 and 767: The following table describes the s
- Page 768 and 769: Parameters The following table desc
- Page 770 and 771: Examples In the following example,
- Page 772 and 773: setPrivateKey Syntax setPrivateKey(
- Page 774 and 775: setRandomSeed Syntax setRandomSeed(
- Page 776 and 777: setRequestHeader Syntax setRequestH
- Page 778 and 779: setSocketOptions Syntax setSocketOp
- Page 780 and 781: showSecurityContext Syntax showSecu
- Page 782 and 783: SIGNATURE Syntax SIGNATURE(algorith
RND<br />
Syntax<br />
RND(num.expr)<br />
Description<br />
The <strong>UniBasic</strong> RND function returns a random integer from 0 through<br />
num.expr minus 1.<br />
Example<br />
In the following example, the program statement prints a random number from 0<br />
through 9:<br />
PRINT RND(10)<br />
Related Command<br />
<strong>UniBasic</strong><br />
RNDSEED<br />
RND 1-693