Friday, January 7, 2011

jBase Infobasic Command CHANGE

The CHANGE Command operates on a variable and replaces all occurrences of one string with another.

Command Syntax

CHANGE expression1 TO expression2 IN variable

Syntax Elements

expression1 - may evaluate to any result and is the string of characters that will be replaced.
expression2 - may also evaluate to any result and is the string of characters that will replace
variable - The variable may be any previously assigned variable in the program.

Notes

There is no requirement that strings be of the same length. The jBASE BASIC language also supports the CHANGE function for compatibility with older systems.

Example

String1 = "Jim"
String2 = "James"
Variable = "Pick up the tab Jim"
CHANGE String1 TO String2 IN Variable
CHANGE "tab" TO "check" IN Variable

0 comments:

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems