AMT Help Files

INSPECT...ENDINSPECT

Syntax

Command
Mandatory parameter
Optional parameter
Mandatory keyword
Optional keyword

INSPECT (<Variable>)
    <Suboption(s)>

ENDINSPECT

Description

This command allows the inspection of the contents of a variable. The contents can be inspected in three ways (suboptions):

The difference between converting and replacing is in the way the characters to replace are presented. In CONVERTING the characters to replace are specified in a string and are to be replaced by characters specified in a second string. In REPLACING the characters or strings to replace are specified as (an array of) individual characters or strings and are te be replaced by characters or strings also specified as (an array of) individual characters or strings.

Remarks

It is allowed to use more than one suboption in a single INSPECT command. The order of execution is the order the suboptions are written in the code. The example shown below is a valid INSPECT command.

Example


va-inspect := '**AB**CD**EF'
inspect (va-inspect)
    counting (result, all'*')   // result will be 6
    converting ('AC*''zla')     // va-inspect will be 'aazBaalDaaEF'
    replacing (all'a''z')     // va-inspect will be 'zzzBzzIDzzEF'
endinspect

 

Suboptions



 

Return to

Commands