Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
33
Task/Substring/ASIC/substring.asic
Normal file
33
Task/Substring/ASIC/substring.asic
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
REM Substring
|
||||
Base$ = "abcdefghijklmnopqrstuvwxyz"
|
||||
N = 12
|
||||
M = 5
|
||||
|
||||
REM Starting from N characters in and of M length.
|
||||
Sub$ = MID$(Base$, N, M)
|
||||
PRINT Sub$
|
||||
|
||||
REM Starting from N characters in, up to the end of the string.
|
||||
L = LEN(Base$)
|
||||
L = L - N
|
||||
L = L + 1
|
||||
Sub$ = MID$(Base$, N, L)
|
||||
PRINT Sub$
|
||||
|
||||
REM Whole string minus last character.
|
||||
L = LEN(Base$)
|
||||
L = L - 1
|
||||
Sub$ = LEFT$(Base$, L)
|
||||
PRINT Sub$
|
||||
|
||||
REM Starting from a known character within the string and of M length.
|
||||
B = INSTR(Base$, "b")
|
||||
Sub$ = MID$(Base$, B, M)
|
||||
PRINT Sub$
|
||||
|
||||
REM Starting from a known substring within the string and of M length.
|
||||
Find$ = "pq"
|
||||
B = INSTR(Base$, Find$)
|
||||
Sub$ = MID$(Base$, B, M)
|
||||
PRINT Sub$
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue