Changes

Jump to: navigation, search

Locomotive BASIC

1,013 bytes added, 20:30, 22 October 2012
/* MID$ */
: [...]
==== <code>MID$(‹string›,‹start position›[,‹length of substring›])</code> ====: [With the MID$ command there are two applications possible: : 1.MID$ creates a new substring out of the give ‹string› and starts at the defined position ‹start position› and print the number of given characters by ‹length of substring›.: If no length is defined every character from ‹start position› will be printed out.]: If a higher value of ‹start position› or ‹length of substring› than the real length of the initial string is defined a blank string will be printed.: The range of ‹start position› or ‹length of substring› is from 0 up to 255 characters. : 2. With MID$ you're able to manipulates given strings by inserting a new string.: Take care of the two different applications and using in BASIC.  : Example for the 1. application:<pre>10 a$="Hello"20 PRINT MID$(a$,2,2)runelReady</pre>:: Example for the 2. application<pre>10 a$="Hello"20 MID$(a$,2,3)="ipp"30 PRINT a$runHippoReady</pre>
==== <code>MODE</code> ====
205
edits