September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
25
Task/Substring/BASIC/substring-6.basic
Normal file
25
Task/Substring/BASIC/substring-6.basic
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
basestring$ = "The five boxing wizards jump quickly"
|
||||
n% = 10
|
||||
m% = 5
|
||||
|
||||
REM starting from n characters in and of m length:
|
||||
substring$ = MID$(basestring$, n%, m%)
|
||||
PRINT substring$
|
||||
|
||||
REM starting from n characters in, up to the end of the string:
|
||||
substring$ = MID$(basestring$, n%)
|
||||
PRINT substring$
|
||||
|
||||
REM whole string minus last character:
|
||||
substring$ = LEFT$(basestring$)
|
||||
PRINT substring$
|
||||
|
||||
REM starting from a known character within the string and of m length:
|
||||
char$ = "w"
|
||||
substring$ = MID$(basestring$, INSTR(basestring$, char$), m%)
|
||||
PRINT substring$
|
||||
|
||||
REM starting from a known substring within the string and of m length:
|
||||
find$ = "iz"
|
||||
substring$ = MID$(basestring$, INSTR(basestring$, find$), m%)
|
||||
PRINT substring$
|
||||
Loading…
Add table
Add a link
Reference in a new issue