Helgef wrote: ↑10 Nov 2018, 07:46
You only copy reference, if that is what worries you.
...
great not to copy the values.
I think it's time that I have a bit more context with.
I wanted to outsource a large part from a function in order to make it easier to read it.
I suspect now is everything as it should be. No big values only references are copied
Code: Select all
; If you want to return extra results from a fnction, you may also use ByRef:
; The IsByRef() function can be used to determine whether the caller supplied a variable for a given ByRef parameter.
setCommandTypeS(ByRef lineObj, ByRef commandTypeObj, ByRef collectionObj, ByRef do, ByRef is_IndexedAhkBlock ){
In this function, some variable but just too long for me
Actually I use the following at the end of this function:
Code: Select all
; now plausibility checks. proof of programer does Bullshit or was lazy 10.11.2018 09:47
o := commandTypeObj ; <=============== trie if it work
if(commandTypeObj.is_multiline_rr)
commandTypeObj.is_r := false
else if(commandTypeObj.is_multiline_r)
commandTypeObj.is_rr := false
else if(!commandTypeObj.is_r && !commandTypeObj.is_rr && !commandTypeObj.is_multiline_r && !commandTypeObj.is_multiline_rr )
o.is_str := true ; <=============== trie if it work
else if(commandTypeObj.is_str){
commandTypeObj.is_r := false
commandTypeObj.is_rr := false
}
return