Hello Charles
i know that you show me once something similar
but i simply forget how...
my question is how to use
]byte b as strptr(s)
byte b1 as strptr(s1)
and how connect this two strings into one ?
here is my try :
'pointer with byte type ...
string s1="Aurel", s3= "_microA"
byte b At strptr s1
byte b1 At strptr s3
bp = b+b1
ps = @bp
'p = @ps
print ps
Hi Aurel,
You will need to add your strings first. Then you have byte access to the whole string.
'pointer with byte type ...
string s1="Aurel", s2= "_microA"
string s3=s1+s2
byte b[] at strptr s3 'array of ascii bytes
ahh i see array of ascii bytes.... i get it
thanks Charles
in this case is also same :
'string pointer
string s = "viva" ,s2 = " LasVegas",ps
'concat two strings
ps = s+s2
int p As string ptr
' p hold addres of ps
p = @ps
'print
print p
yes i see it now ...ok :)
hmm but how print content of that
array of ascii bytes ?
If you don't want to refer to the original string, it is possible to turn the array of bytes back into a string for printing etc.
But both the byte array and the new string are directly coupled to the original string.
...
byte b[] at strptr s3 'array of ascii bytes
print b[3]
'
'now reference b as a string again
bstring bs
strptr(bs)=@b
print bs
thanks Charles
i see now where is a trick :)