Jump to content
Fórum Script Brasil
  • 0

Inicialização De Vetores


Guest Aureo

Question

Gostaria de saber se tem algum modo de inicializar uma matriz em VB 6.0

Eu estou usando o Select Case e queria saber se tem um modo mais fácil do que esse:

for X=0 to 2

for Y=0 to 6

Select Case X

Case 0:

Select Case Y

Case 0: PALAVRA(X,Y)="A"

Case 1: PALAVRA(X,Y)="M"

Case 2: PALAVRA(X,Y)="A"

Case 3: PALAVRA(X,Y)="R"

Case 4: PALAVRA(X,Y)="E"

Case 5: PALAVRA(X,Y)="L"

Case 6: PALAVRA(X,Y)="O"

end select

Case 1:

Case 0: PALAVRA(X,Y)="L"

Case 1: PALAVRA(X,Y)="A"

Case 2: PALAVRA(X,Y)="R"

Case 3: PALAVRA(X,Y)="A"

Case 4: PALAVRA(X,Y)="N"

Case 5: PALAVRA(X,Y)="J"

Case 6: PALAVRA(X,Y)="A"

end select

end select

next

next

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Case 1:

Case 0: PALAVRA(X,Y)="L"

Case 1: PALAVRA(X,Y)="A"

só fiz um errinho ali:

Case 1:

Select Case Y:

Case 0: PALAVRA(X,Y)="L"

Case 1: PALAVRA(X,Y)="A"

agora sim...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.5k
×
×
  • Create New...