Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Substring/BBC-BASIC/substring.basic
Normal file
25
Task/Substring/BBC-BASIC/substring.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