Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



REPLACE is an obsolete way to assign to dynamic arrays via a function. It takes the form: 

REPLACE(var, expression1{, expression2{, expression3}}; expression4)


  • var is the dynamic array that the REPLACE function will use to assign expression4. Unless the same var is assigned the result of the function remains unchanged.
  • expression1 specifies into which field assignment will be made and should evaluate to a numeric.
  • expression2 is only specified when multi-value assignment is to be done and should evaluate to a numeric.
  • expression3 is only specified when sub-value assignment is to be done and should evaluate to a numeric.
  • expression4 can evaluate to any data type and is the actual data that will be assigned to the array.

The function returns a copy of var with the specified replacement carried out. This value may be assigned to the original var in which case the jBASE BASIC compiler will optimize the assignment.

An example of use is as: 

X = "JBASE":MV:"is Great"
X = REPLACE (X,1,1;"jBASE")

Go back to jBASE BASIC

Was this article helpful?