03-05-2015, 03:32 PM
Thanks both work great!
Just so I understand syntax on first one:
the integer pointer (*) variable p initially points to the address (&) of the first argument e0.
I am a little unsure what the [i] after the p means - is it incrementing the pointer to the address in memory by 1 to pull in the additional arguments.
I see from the help menu
but why is the i-th character in the address of e0 equivalent to the next argument's value?
Thanks,
S
Just so I understand syntax on first one:
the integer pointer (*) variable p initially points to the address (&) of the first argument e0.
I am a little unsure what the [i] after the p means - is it incrementing the pointer to the address in memory by 1 to pull in the additional arguments.
I see from the help menu
A single character can be accessed using [] operator:
;
str s = "Cat"
int char = s[1]
;now char is 97 ('a' character code)
s[0] = 66
;now s is "Bat" (66 is 'B' character code)
s[2] = 'r'
;now s is "Bar"but why is the i-th character in the address of e0 equivalent to the next argument's value?
Thanks,
S
