[ajuda] array em pascal

Started by DarkJoker, February 05, 2007, 09:20:18 AM

Previous topic - Next topic

DarkJoker

pessoal tou aqui a precisar d ajuda... alguem m podia explicar como funciona o array em pascal? opa tipo eu ja dei isso mas n percebo nada disso... sei como identificalo como variavel mas depois n o sei aplicar no programa  :confuso:
alguem m pode dar uma "maozinha"?
cumps...
"Don't gain the world and loose your soul, wisdom is better than silver & gold" - Bob Marley

"Microsoft isn't evil, they just make really crappy operating systems." - Linus

KTachyon

Como aplicar, como?

Tu declaras o tipo

TYPE

arrayInt = array[1..7] of integer;

Depois a variável

VAR

num: arrayInt;

E depois usas

BEGIN

num[1] := 0;

num[3] := 3555;
My Q4 estimate: Macs: 5.89M; iPods: 4.19M; iPhones: 30.0M; iPads: 18.05M; Revenue: 37.00B; EPS: 9.50
AAPL Q3 result: Macs: 4.02M; iPods: 6.80M; iPhones: 26.0M; iPads: 17.04M; Revenue: 35.02B; EPS: 9.32

DarkJoker

ya brigado tava-m a faltar declarar a posição depois no codigo... thanks :boa:
"Don't gain the world and loose your soul, wisdom is better than silver & gold" - Bob Marley

"Microsoft isn't evil, they just make really crappy operating systems." - Linus