Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Intermec Online Guide - <b>define string (d)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DEFINE STRING (D)

Purpose: Define file record or string register as equal to contents of
         another file record, to contents of a string register, or to
         literal data.  Concatenate, seperate, and truncate data and
         place in file record or string register.

Format:  Dn1 = {1}

         D         Define

         n1        File record or string register

         {1}       Select one of the following:

                   N2 file record, string register, literal data

                   Expression:         Function:

                   Dn1 = n2            Copy n2 to n1

                   Dn1 = ""            Clear n1

                   Dn1 = "data"        Copy data to n1
                                       "" are required

         Argument: concatenate, seperate, or truncate (+, M, L&R)

                   Expression:         Function:

                   Dn1 = n2 + n3       Concatenate n2, n3

                   Dn1 = n2Lx          Take left x characters of n2;
                                       left truncation

                   Dn1 = n2Rx          Take right x characters of n2;
                                       right truncation

                   Dn1 = n2Mx,y        Take x characters starting at
                                       position y in string;
                                       middle seperation

                   n2 & n3 = file record, string register, or literal data


         If:                           Then:

         Dn1 = n2

           > 128 character or          Put only what will fit in n1
           maximum record size

         DA(#d)=$1

           Numeric register #d         Don't store data: display
           > number of records         REC. ACCESS ERROR
           file opened with

         Concatenate

           > 128 character or          Put only what will fit in n1
           maximum record size

         Truncate  (Dn1 - n2Lx or Dn1 = n2Rx)

           Not x characters in n2      n1 = n2

         Middle seperation  (dn1 = n2Mx,y)

           Not y characters in n2      n1 is blank

           Not x + y characters in n2  Put all characters after position x
                                       of n2 into n1


         The commands DA(1) = #1 and D#1 = A(1) are invalid.  A numeric
         register cannot be copied into a file record (or vice versa)
         unless the Convert (C) Command is used.


Examples:          If:                 And:                Then:

                 Dn1 = n2

                   DA(1) = "Reader"    ----                A(1) = "Reader"

                   DA(1) = $1          $1 = 1234           A(1) = 1234

                 Dn1 = argument

                   DA(1) = A(2) + A(3) A(2) = Read         A(1) = Reader
                                       A(3) = er

                   DA(1) = A(2)l3      A(2) = Read         A(1) = Rea

                   DA(1) = A(2)M2,2    A(2) = Read         A(1) = ea

                   DA(1) = A(2)r3      A(2) = Read         A(1) = ead

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson