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?



jBC: Add new version of FOLD() with 3 parameters for D3 compatibility 

Previous Release Behavior

The FOLD() function always used @AM as the delimiter. 

Current Release Behavior

The FOLD() function now accepts a 3rd parameter which is the delimiting character. If the delimiter is "" then the we defaul to @VM. 

0001     s = "Space the final frontier"
0003     folded = FOLD(s, 10, "")
0004     CRT OCONV(folded, "mcp")
0006     folded = FOLD(s, 10, ";")
0007     CRT folded

This displays: 

Space the]final]frontier
Space the;final;frontier

Note that the current 2-parameter version of FOLD() has some ideosyncracies, including allowing a field to be generated the wrong width. This new 3-parameter version of FOLD() fixes these problems, however the old 2-parameter version will continue to work as before for backward compatibility. 

Was this article helpful?