UniBasic Commands Reference - Rocket Software
UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software
Options The value of option determines the operation to be executed. The following table describes these options and their results. Value Description Examples In the following example, the program segment inserts AR in the string ASTATES. After execution, ASTATES contains the string “AL:AK:AR:AZ”. 1-250 UniBasic Commands Reference If option > 0 UniData replaces the number of substrings specified in option. If option = 0 UniData inserts new.expr at the position indicated by b.pos. If option < 0 UniData deletes the number of substrings specified in option, and inserts new.expr at the location indicated by b.pos. FIELDSTORE Options ASTATES = 'AL:AK:AZ' ASTATES = FIELDSTORE(ASTATES,':',3,0,'AR') The following program segment compiles and runs only when null value handling is on. The program segment inserts AR, and then inserts the null value into ASTATES. It calls the externally cataloged subroutine PRINT.SETUP to convert the null value to a printing character, and then prints the converted ASTATES. (PRINT.SETUP is shown under CHANGE.) PRT.STR = '' ASTATES = 'AL:AK:AZ' ASTATES = FIELDSTORE(ASTATES,':',3,0,'AR') PRINT "ASTATES = ":ASTATES ASTATES = FIELDSTORE(ASTATES,':',3,0,@NULL) STR = ASTATES CALL PRINT.SETUP(STR,PRT.STR) PRINT "ASTATES = ":PRT.STR This program prints the following: ASTATES = AL:AK:AR:AZ ASTATES = AL:AK:@NULL:AR:AZ
In the next example, the program segment specifies that processing begins at the fifth value (ugly), that this value is deleted (the -1 option), and that the new.expr (orange,black) is to be inserted in the same position. After processing, COLORS contains the string “yellow,blue,red,green,orange, black,white”. COLORS = 'yellow,blue,red,green,ugly,white' COLORS = FIELDSTORE(COLORS,',',5,-1,'orange,black') Related Commands UniBasic INS, INSERT FIELDSTORE 1-251
- Page 238 and 239: Output Variables The following tabl
- Page 240 and 241: EDADRV_GetDBInfo Syntax RETCODE EDA
- Page 242 and 243: EDADRV_GetEDAAttr Syntax RETCODE ED
- Page 244 and 245: EDADRV_GetErrmsg Syntax RETCODE EDA
- Page 246 and 247: Input Variables The following table
- Page 248 and 249: EDADRV_LoadSymbols Syntax RETCODE E
- Page 250 and 251: Output Variables The following tabl
- Page 252 and 253: Return Codes The following table de
- Page 254 and 255: Input Variables The following table
- Page 256 and 257: STATUS Codes ENABLEDEC has the foll
- Page 258 and 259: Parameter Description dataLoc 1 - D
- Page 260 and 261: Parameters he following table descr
- Page 262 and 263: END Syntax END Description The UniB
- Page 264 and 265: Related Commands UniBasic CALL, CHA
- Page 266 and 267: Examples In the following example,
- Page 268 and 269: EQU Syntax EQU constant1 TO value1
- Page 270 and 271: In the next example, UniData replac
- Page 272 and 273: EXECUTE Syntax EXECUTE "str.expr" [
- Page 274 and 275: Parameter Description Reminder: The
- Page 276 and 277: Related Commands UniBasic COMMON, E
- Page 278 and 279: Parameter Description Examples In t
- Page 280 and 281: The program output is: 1-274 UniBas
- Page 282 and 283: EXP Syntax EXP(expr) Description Th
- Page 284 and 285: Examples The following program segm
- Page 286 and 287: In the next example, the program se
- Page 290 and 291: FILEINFO Syntax FILEINFO(file.var,
- Page 292 and 293: Code 9 Merge factor percentage 10 S
- Page 294 and 295: FILELOCK Syntax FILELOCK [file.var]
- Page 296 and 297: FILEUNLOCK Syntax FILEUNLOCK [file.
- Page 298 and 299: FIND Syntax FIND expr IN dyn.array[
- Page 300 and 301: Related Commands UniBasic [], FINDS
- Page 302 and 303: Parameter Description Examples In t
- Page 304 and 305: FMT Syntax FMT(expr, "len [f.char]
- Page 306 and 307: STATUS Function Return Values After
- Page 308 and 309: FOOTING Syntax FOOTING [ON num.expr
- Page 310 and 311: Related Commands UniBasic GETPTR, H
- Page 312 and 313: This program segment produces the f
- Page 314 and 315: Parameter Description Examples The
- Page 316 and 317: FUNCTION Syntax FUNCTION function.n
- Page 318 and 319: The following program calls the pre
- Page 320 and 321: GE Syntax expr1 GE expr2 Synonyms #
- Page 322 and 323: generateKey Syntax generateKey(priv
- Page 324 and 325: Return Code Status 1-286 UniBasic C
- Page 326 and 327: GET Syntax GET[X] var[,length] [SET
- Page 328 and 329: Example In the following example, t
- Page 330 and 331: Parameters The following table desc
- Page 332 and 333: getHTTPDefault Syntax getHTTPDefaul
- Page 334 and 335: GETLIST Syntax GETLIST list.name [,
- Page 336 and 337: UniData SQL SELECT - For informatio
In the next example, the program segment specifies that processing begins at the fifth<br />
value (ugly), that this value is deleted (the -1 option), and that the new.expr<br />
(orange,black) is to be inserted in the same position. After processing, COLORS<br />
contains the string “yellow,blue,red,green,orange, black,white”.<br />
COLORS = 'yellow,blue,red,green,ugly,white'<br />
COLORS = FIELDSTORE(COLORS,',',5,-1,'orange,black')<br />
Related <strong>Commands</strong><br />
<strong>UniBasic</strong><br />
INS, INSERT<br />
FIELDSTORE 1-251