Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array passado por referência
Message
From
26/02/2005 10:09:04
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Array passado por referência
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
00990871
Message ID:
00990871
Views:
52
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?...
Next
Reply
Map
View

Click here to load this message in the networking platform