Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with strings 2.3.3.2
#1
The following statements give correct output with 2.3.3.0

Macro temp
Trigger SF12     Help - how to add the trigger to the macro
Code:
Copy      Help
str s="23-06-2010 10:28:39"
str st.from(_s.get(s 6 4) _s.get(s 3 2) _s.get(s 0 2) " " _s.get(s 11 2) _s.get(s 14 2) _s.get(s 17 2))
out st
;20100623 102839

However the result is erroneous (39) woth 2.3.3.2.

Please advise.
#2
Cannot use the same str variable as argument calling a function multiple times, because then previously evaluated argument becomes invalid. Worked previously accidentally.
#3
Macro Macro1622
Code:
Copy      Help
str s="23-06-2010 10:28:39"
;str st.from(_s.get(s 6 4) _s.get(s 3 2) _s.get(s 0 2) " " _s.get(s 11 2) _s.get(s 14 2) _s.get(s 17 2)) ;;error
str st.fromn(s+6 4  s+3 2   s 2  " " 1  s+11 2  s+14 2  s+17 2) ;;use this
out st
;20100623 102839

or

Macro Macro1623
Code:
Copy      Help
str s="23-06-2010 10:28:39"
;str st.from(_s.get(s 6 4) _s.get(s 3 2) _s.get(s 0 2) " " _s.get(s 11 2) _s.get(s 14 2) _s.get(s 17 2)) ;;error
s.replacerx("^(\d\d)-(\d\d)-(\d\d\d\d) (\d\d):(\d\d):(\d\d)$" "$3$2$1 $4$5$6") ;;use this
out s
;20100623 102839
#4
Dear Gintaras, Thanks. I can assure you it is working properly since 2005 that I started using QM. Anyway I will correct it. Regards Simos.
#5
Fixed in 2.3.3.3.
http://{deleted post}
#6
Thanks, perfect, although the solution you proposed with fromn is smarter. Regards.


Forum Jump:


Users browsing this thread: 1 Guest(s)