Warning
You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
strncpy [2019/05/22 22:08] – neils | strncpy [2020/04/14 08:58] (current) – neils | ||
---|---|---|---|
Line 16: | Line 16: | ||
rem -- the above will output " | rem -- the above will output " | ||
| | ||
- | '' | + | '' |
**CBM BASIC** code: | **CBM BASIC** code: | ||
10 a$=" | 10 a$=" | ||
- | 20 b$=right$(a$, 5) | + | 20 b$=mid$(a$, 4, 3) |
30 print b$ | 30 print b$ | ||
| | ||
Line 29: | Line 29: | ||
dim buffer![6] | dim buffer![6] | ||
b$ = @buffer! | b$ = @buffer! | ||
- | | + | |
print b$ | print b$ | ||
| | ||
- | Both programs will output "world". | + | Both programs will output "o w". |
| | ||
**Important note**: The routine will not stop copying at the end of // | **Important note**: The routine will not stop copying at the end of // | ||