Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (316 - 318 of 3899)

Ticket Resolution Summary Owner Reporter
#3114 Rejected Array as an parameter for Call Function instead of n parameters TheDcoder
Description

I think it would be better if Call function can accept an array for the parameters of the function to call instead of n number of parameters because it will allow UDFs to call a function with a dynamic number of parameters like this:

Call ( "function" , $aParameters)

$aParameter[0] = Number of parameters (0 if none.)

$aParameter[1] = 1st parameter

...

$aParameter[n] = nth Parameter

Feature Discussion in Forum: https://www.autoitscript.com/forum/topic/176243-feature-request-array-as-an-parameter-for-call-function-instead-of-n-parameters/?do=findComment&comment=1268447

#1566 Fixed Array as its own element issue trancexx trancexx
Description

Code is:

#include <Array.au3>

Global $a[3] = [1, 2, 3]
$a[1] = $a

; And then
$b = $a[1]
$c = $b[1]
$d = $c[1]
$e = $d[1]
$f = $e[1]
;...
_ArrayDisplay($a, "Displaying $a")
_ArrayDisplay($b, "Displaying $b")
_ArrayDisplay($c, "Displaying $c")
_ArrayDisplay($d, "Displaying $d")
_ArrayDisplay($e, "Displaying $e")
_ArrayDisplay($f, "Displaying $f")

If array (old) is put as some element of its own endless* recursion occurs. Expected would be $b to be 1, 2, 3. Obvious workaround works as expected.

I tried to determine how deep it goes but my RAM was sucked up. 10000 here:

#AutoIt3Wrapper_Run_Au3check=n

	Global $0[3] = [1, 2, 3]
	$0[1] = $0

	$iMax = 10000 ; Probably 16000000 / 3 is the max
	For $i = 1 To $iMax
	Assign($i, Execute("$" & $i - 1 & "[1]"))
	Next
	_ArrayDisplay(Eval($iMax), "Displaying $" & $iMax)

If this is combined with Ticket #1565 AutoIt crashes (stack overflow).

$a = StringSplit("ab", "")
$a[1] = $a

$obj=ObjCreate("Scripting.Dictionary")
MsgBox(64, "", "It will crash now")
$obj.add("test", $a)
#2505 Duplicate Array create without declaration anonymous
Description
Local $aData = ['p','e','t']
;OR
_my(['p','e','t'])
Func _my($aD)
	;...
EndFunc

;OR
Local $aData[1][3]  ;create array
$aData[0] = ['p','e','t'] ;fill the first element
;must be the same as
;Local $aData[1][3]
;$aData[0][0] = 'p'
;$aData[0][1] = 'e'
;$aData[0][2] = 't'
Note: See TracQuery for help on using queries.