Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Como saber si una variable es tipo array?
Message
From
08/02/2002 08:54:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00616974
Message ID:
00617258
Views:
30
>>>Hola amigos,
>>>
>>>Una curiosidad, como puedo saber si una variable es de tipo array?
>>
>>
>>if type("SupuestoArray(1)") # "U"
>>   ? "Sí, es un array"
>>endif
>>
>
>Hola a ambos.
>Recuerden que VarType (desde VFP6, SP 3, creo) es más rápida que Type().
>
>
>if varType( SupuestoArray(1) ) # "U"
>   ? "Sí, es un array"
>endif
>
>
>Generalmente no hay gran diferencia, salvo si queda dentro de una loop con muchas iteraciones.
>
>Saludos,

No sabía lo de la velocidad. Lo que sí sabía es que vartype falla con mayor frecuencia... Creo que cuando no existe la variable, o algo por el estilo. No lo usé mucho.

Hilmar.
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
Next
Reply
Map
View

Click here to load this message in the networking platform