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 revision | |||
strcpy [2019/05/22 21:46] – neils | strcpy [2019/05/22 21:51] (current) – neils | ||
---|---|---|---|
Line 22: | Line 22: | ||
10 a$=" | 10 a$=" | ||
20 b$=right$(a$, | 20 b$=right$(a$, | ||
+ | 30 print b$ | ||
| | ||
**XC=BASIC** code: | **XC=BASIC** code: | ||
Line 29: | Line 30: | ||
b$ = @buffer! | b$ = @buffer! | ||
strcpy b$, a$+(strlen!(a$)-5) | strcpy b$, a$+(strlen!(a$)-5) | ||
+ | print b$ | ||
+ | | ||
+ | Both programs will output " | ||
| | ||
**Important note**: even if //source// is longer than // | **Important note**: even if //source// is longer than // | ||
**Note**: you can't copy a string using '' | **Note**: you can't copy a string using '' |