Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute Python Code in QM Using python.net
#6
Function VariantArgsToArray
Code:
Copy      Help
;/
function ARRAY(VARIANT)&a VARIANT&firstParam nParamsBefore

;Creates ARRAY(VARIANT) a and moves VARIANT parameters of the caller function to it.

;a - ARRAY(VARIANT) variable. This function creates the array.
;firstParam - address of the first VARIANT parameter.
;nParamsBefore - the number of function parameters before the first VARIANT parameter.

;EXAMPLE
;function` $name [`_A1] [`_A2] [`_A3] [`_A4] [`_A5] [`_A6]
;ARRAY(VARIANT) a; VariantArgsToArray a &_A1 1

int na = getopt(nargs 1)-nParamsBefore
a.create(na)
if na>0
,na*sizeof(VARIANT)
,memcpy &a[0] &firstParam na
,memset &firstParam 0 na


Messages In This Thread
RE: Execute Python Code in QM Using python.net - by Gintaras - 06-08-2025, 03:47 PM
RE: First steps with Python.NET - by Davider - 06-09-2025, 03:30 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)