IT SOLUTIONS
Your full service technology partner! 
+Expand
   ► KBTo/From GuidesCorel ParadoxCommands  Print This     

Cross Ref > Commands

By Mike Prestwood

Corel Paradox versus JavaScript: A side by side comparison between Corel Paradox and JavaScript.

 
Commands
 

Common commands (procedures and functions). A function returns a value. Optionally, it may also perform an action prior to returning a value. A procedure does not return a value or it returns void or null.

Left of String

[Other Languages] 
Corel Paradox:   subStr

substr ( const startIndex LongInt [ , const numberOfChars LongInt ] ) String

Alternative syntax:

LeftString = subStr(NameVar, 1, 3)
Syntax Example:
var
�LeftString String;
  NameVar String;
endVar
NameVar = "Prestwood"
LeftString = NameVar.subStr(1, 3)
msgInfo("", LeftString)
JavaScript:   substr

Above returns "Mike P".

SubStr(StartIndex, NumberOfCharacters)

Notice JavaScript is 0 based (the first character is character 0).�0 is start character, 6 is number�of characters).�

You can also use substring where both numbers are indexes:

SubString(StartIndex, EndIndex)

The following returns "re".

var sName;
sName = "Mike Prestwood";
sName = sName.substring(6, 8);
document.write(sName);
Syntax Example:
var sName;
sName = "Mike Prestwood";
sName = sName.substr(0, 6);
document.write("Hello " + sName);




Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]