Table of Contents

MID$

PET VIC-20 C64 C16 Plus/4 C128 X16

The MID$() funcition returns <length> characters from a sring, starting from <position>.

Syntax

MID$(<input$>, <position>,  <length>)

Warning

Unlike in CBM BASIC, the character position is zero-based, i. e. the first character's position is 0.

Example

DIM in$ AS STRING * 30
in$ = "xc=basic programming language"
PRINT MID$(in$, 9, 11) : REM outputs: programming

See also