Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string operators and s.expandpath
#2
Operator + in QM does not join strings when used with =. To join two or more strings, use ss.from(s s2 ...).

When you use ss=s+s2, s is interpreted as lpstr (pointer to first character), and second operand is added to it as integer, like in C. For example

str s="abc"
out s+1

outputs "bc", because pointer is moved by 1 character.

If both operands are strings or pointers, result is integer.


BTW, you can use this:

str s.expandpath("$Desktop$\myfile.txt")


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)