Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>mid$ assign substring statement</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
MID$                     Assign Substring                           Statement

MID$(stringvar,n[,length]) = stringexpr

    Assigns all or some of a string expression to a string variable,
    beginning at a specified character position within the string
    variable.

   stringvar    The string variable whose characters will be replaced.

           n    A numeric expression in the range 1 to 255, specifying the
                position within stringvar where the character replacement
                is to begin.

      length    A numeric expression in the range 0 to 255, specifying the
                number of characters from stringexpr that will be used. If
                length is omitted, all of stringexpr is used.

  stringexpr    The string expression supplying replacement characters for
                stringvar.

   ----------------------------------------------------------------------

      Notes:    In the syntax shown above, the characters in stringexpr
                replace length characters in stringvar, beginning at
                character n.

                In no case will the length of stringvar increase as a
                result of a MID$ statement. For example, if stringvar is
                seven characters long, and n is 3 and length is 6, only
                the first five characters of stringexpr will be assigned
                to stringvar.

See Also: MID$ (Function)

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