MODIFY$ enables you to edit a (calculated) string before using it

Syntax

  1. MODIFY$(StrVal$, Caption$, [Mode%=0, 1 or 2])
  2. MODIFY$(StrExp$, Caption$, [Mode%=0, 1 or 2])

Arguments

  • StrVal$ is a string value
  • StrExp$ is a string expression containing a string or document
  • Caption$ is the caption of editor to be presented in dialogue
  • Mode% is an option for the behaviour before and after this function is initiated:
    • Mode%=0 [default]: do not save the value in the parameter initiating the function. Thus, it will be interpreted by the system as intermediate calculated data. When the solution is repeated, the modified data will be reset and the calculation will be performed again (you lose your modified data);
    • Mode%=1: save the modified value in the parameter initiating the function. Thus, the modified data will be interpreted as input. When the solution is repeated, the modified data will be used and no recalculation will be carried out;
    • Mode%=2always save the value in the parameter initiating the function. Thus, the data will always be interpreted as input (also when Telitab$ was initially based on calculations). When the solution is repeated, the modified data will be used and no recalculation will be carried out;

Remarks

  1. The MODIFY$ function makes it possible to carry out complex calculation and present the resulting string in order for the user to decide whether to use the string or modify it for further use. It provides an expert opinion while keeping flexibility
  2. The MODIFY$ function opens the string in the internal text editor (and through this with the standard Editor program) to be modified by a user. The user can change this text file. After closing the editor, the MODIFY$ function returns a string containing the edited contents of StrExp$
  3. See also MODIFY() and MODIFY#() for the same type of behaviour on other type of values 

Examples

FinalText$ = MODIFY$("This is the concept version of the text", "Modify this text", 1)

Opens the text editor with the text: "This is the concept version of the text" showing caption "Modify this text". When you replace "concept" by "final" and close the file, the function returns a string containing:

"This is the final version of the text"

The current value FinalText$ is changed in the above, modified value since Mode%=1


 

Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview

  • No labels