Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Example of a parameter to Callback_q_sort
#1
I would appreciate it if you could give an example of calling q_sort callback with an int type parameter equal to 1.

This is my approach with str :

Function tempf01
Code:
Copy      Help
lpstr pa
pa="1"
q_sort &a[0] a.len sizeof(lpstr) fa pa

.......................................
;Callback function fa
function[c] $param $&s1 $&s2
out val(param)
#2
q_sort ... +1
...
function[c]# k ...

+ is a "type cast" operator

or

int k=1
q_sort ... &k
...
function[c]# int&k ...

then callback function can change k value
#3
Many thanks indeed!


Forum Jump:


Users browsing this thread: 1 Guest(s)