Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Strings and Variables Combo
#1
I need to set text on a window using a combination string and numberic varaible. For example:

out "This is line " x " of paragraph 5."


where x above represents a number.

How do I accomplish this in QM?

Thanks!
#2
Code:
Copy      Help
str s ;;declare variable s

s.format("This is line %i of paragraph 5." x) ;;replaces %i to x
;-or-

s.from("This is line " x " of paragraph 5.") ;;join several parts. With older QM versions, only two parts can be used.
;-or-

s="This is line "; s+x; s+" of paragraph 5."

outp s ;;paste s

;-or-
outp "This is line %i of paragraph 5." x ;;format and paste


Forum Jump:


Users browsing this thread: 1 Guest(s)