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 revisionLast revisionBoth sides next revision | ||
strcpy [2019/05/22 21:38] – neils | strcpy [2019/05/22 21:46] – neils | ||
---|---|---|---|
Line 15: | Line 15: | ||
print b$ | print b$ | ||
rem -- the above will output " | rem -- the above will output " | ||
+ | | ||
+ | '' | ||
+ | |||
+ | **CBM BASIC** code: | ||
+ | |||
+ | 10 a$=" | ||
+ | 20 b$=right$(a$, | ||
+ | | ||
+ | **XC=BASIC** code: | ||
+ | |||
+ | a$ = "hello world" | ||
+ | dim buffer![6] | ||
+ | b$ = @buffer! | ||
+ | strcpy b$, a$+(strlen!(a$)-5) | ||
| | ||
**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 '' |