Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array passado por referência
Message
From
26/02/2005 17:58:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
26/02/2005 10:09:04
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
00990871
Message ID:
00990924
Views:
12
This message has been marked as the solution to the initial question of the thread.
Veja o comando EXTERNAL, para evitar erros do compilador.

>Pessoal,
>
>Como passar um array por referência a uma função sem dar problema ao compilar?... vejam o exemplo abaixo:
>
>
>Local array laArray[2]
>* ---
>laArray[1] = "Primeiro"
>laArray[2] = "Segundo"
>ReceberArray(@laArray)
>? laArray[1]
>? laArray[1]
>* ---
>Procedure ReceberArray(taArray) as Boolean
>  taArray[1] = taArray[1] + " - Alterado"
>  taArray[2] = taArray[2] + " - Alterado"
>EndProc
>
>
>Ao tentar compilar o VFP8 emite a seguinte mensagem:
>
>Locate File
>Locate
>Ignore
>Ignore all
>Cancel
>Unable to find Unknown TAARRAY
>
>
>Sei que posso declarar outro array local em ReceberArray, copiar o taArray pro array local, trabalhar com o local, depois copiar pra taArray novamente, mas como posso resolver isso sem declarar novo array?...
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform