UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
In the next example, the program segment displays 1AA33BB667. Note that the fives in X are dropped because no corresponding substitute is provided. X = "122334455667" PRINT CONVERT("245","AB",X) In the following example, Z becomes kakakakaka because the extra character “t” in S2 is ignored: Y="sasasasasa" S1="s" S2="kt" Z=CONVERT(S1,S2,Y) PRINT Z Related Commands UniBasic CONVERT command, SWAP 1-169 UniBasic Commands Reference
COS Syntax COS(expr) Description The UniBasic COS function returns the trigonometric cosine of a numeric expression. Examples In the following example, the program statement assigns the cosine of a 60-degree angle to the variable COSINE. COSINE is assigned the value of 0.5. COSINE = COS(60) In the next example, the program statement prints the cosine of the variable VAL plus 10: PRINT COS(VAL+10) Related Commands ACOS, ASIN, ATAN, COS, SIN, TAN COS 1-170
- Page 116 and 117: Example In the following example, t
- Page 118 and 119: Parameters The following table desc
- Page 120 and 121: CALLC Syntax CALLC c.sub.name [(arg
- Page 122 and 123: CASE Syntax BEGIN CASE CASE express
- Page 124 and 125: In the next example, the program se
- Page 126 and 127: Related Commands UniBasic CATS, SPL
- Page 128 and 129: CHAIN Syntax CHAIN "str.expr" Descr
- Page 130 and 131: CHANGE Syntax CHANGE(string, old.su
- Page 132 and 133: CHAR Syntax CHAR(expr) Description
- Page 134 and 135: CHARLEN Syntax CHARLEN (string) Des
- Page 136 and 137: CHECKSUM Syntax CHECKSUM(str.expr)
- Page 138 and 139: Related Commands UniBasic COMMON, C
- Page 140 and 141: UniData DELETECOMMON, STACKCOMMON -
- Page 142 and 143: CLEARFILE Syntax CLEARFILE [file.va
- Page 144 and 145: CLEARINPUT Syntax CLEARINPUT Synony
- Page 146 and 147: UniQuery GET.LIST, SELECT, SSELECT
- Page 148 and 149: CLOSE Syntax CLOSE [file.var] [ON E
- Page 150 and 151: CLOSESEQ Syntax CLOSESEQ seq.file.v
- Page 152 and 153: closeSocket Syntax closeSocket(sock
- Page 154 and 155: COL1 Syntax COL1( ) Description The
- Page 156 and 157: COMMON Syntax COMMON [/common.name/
- Page 158 and 159: 1-161 UniBasic Commands Reference
- Page 160 and 161: UniData DELETECOMMON, STACKCOMMON -
- Page 162 and 163: Related Command UniBasic EXIT 1-165
- Page 164 and 165: In the next example, the program se
- Page 168 and 169: COUNT Syntax COUNT(str.expr1, str.e
- Page 170 and 171: COUNTS Syntax COUNTS(expr,str.expr)
- Page 172 and 173: createCertificate Syntax createCert
- Page 174 and 175: createCertRequest Syntax createCert
- Page 176 and 177: Parameter Description The following
- Page 178 and 179: The following table describes the a
- Page 180 and 181: createSecureRequest Syntax createSe
- Page 182 and 183: Method Description The following ta
- Page 184 and 185: Parameters The following table desc
- Page 186 and 187: DATA Syntax DATA expr1 [,expr2]...
- Page 188 and 189: DBTOXML Syntax DBTOXML(xml_document
- Page 190 and 191: DCOUNT Syntax DCOUNT(str,delim) Des
- Page 192 and 193: DEACTIVATEKEY Syntax DEACTIVATEKEY
- Page 194 and 195: STATUS Code Example The following e
- Page 196 and 197: DEFFUN Syntax DEFFUN function.name
- Page 198 and 199: The preceding program calls the fol
- Page 200 and 201: Examples The following program segm
- Page 202 and 203: Examples The following program stat
- Page 204 and 205: In the next example, the program st
- Page 206 and 207: UniData SQL SELECT - For informatio
- Page 208 and 209: Examples In the following example,
- Page 210 and 211: Parameters The following table desc
- Page 212 and 213: DIGEST Syntax DIGEST(algorithm, dat
- Page 214 and 215: DIR Syntax DIR(file.expr) Descripti
COS<br />
Syntax<br />
COS(expr)<br />
Description<br />
The <strong>UniBasic</strong> COS function returns the trigonometric cosine of a numeric<br />
expression.<br />
Examples<br />
In the following example, the program statement assigns the cosine of a 60-degree<br />
angle to the variable COSINE. COSINE is assigned the value of 0.5.<br />
COSINE = COS(60)<br />
In the next example, the program statement prints the cosine of the variable VAL plus<br />
10:<br />
PRINT COS(VAL+10)<br />
Related <strong>Commands</strong><br />
ACOS, ASIN, ATAN, COS, SIN, TAN<br />
COS 1-170