HelpPages

Home | Developer | Frames | Scripts | Introduction

Introduction

    SCRIPTS - INTRODUCTION

    The scripts or procedures allow the edition of programs that can use the basic structures of the system, in a simple and versatile way. They are text files, editable with any text editor that support text format or with AppDesigner.
    This is a standard language, similar to the basic, with the usual flow controls, plus a series of commands oriented to data management. If you have the libraries of the system, it is possible to add commands of your own creation, programmed in C or C ++, but according to your operating system, could be programmed in other languages.
    The scripts can be used in two ways, as independent procedures launched from a menu, similar to a maintenance or a report, or from any expression using the EXEC$ function. The normal strategy in the second case, is not to use commands, but merely data collection, although a cautious programmer has available all the power the entire system. As a convention PRC extensions are used for the first type of scripts and extensions for the second type is PRX by default.
    The basic syntax to start a script from a menu would be:
    PrcExec PROCCALLER$
    The syntax for a script to start from a function is:
     EXEC$(PROCCALLER$)
    In both cases, PROCCALLER$ will be the script file name, optionally followed by the descriptor of the start tag, separated by ";". Here we can see some examples:
    PrcExec 'PROG.PRC'
    PrcExec 'PROG.PRC;SUBPROC_A'
    EXEC$('PROG.PRX')
    PROGCALLER$='PROG.PRX;SUBPROC_A';EXEC$(PROGCALLER$)