Guide e Tutorials:indexed | |||
Le API: approfondimenti sul concetto di struttura: tipi definiti dall'utente Se recuperiamo la definizione di struttura e l'esempio analizzato nell'ultimo articolo sulle API, possiamo addentrarci meglio nella comprensione di tali concetti. Eravamo infatti rimasti alla struttura denominata STRUTTURADIESEMPIO caratterizzata dal seguente codice:
|
Dim Es As STRUTTURADIESEMPIO Es.Variabile_Long = 50 Es.Altra_Variabile = 40 + Es.Variabile_Long Es.Testo = "testo" ... |
Private Type SSTRUTT Nome As String Cognome As String Eta As Integer Tel As Integer End Type |
Private Sub Form_Load() Dim Utente As SSTRUTT Utente.Nome = "Giovanni" End Sub |
Private Type SSTRUTT Nome As String Cognome As String Eta As Integer Tel As Integer End Type Dim Utente As SSTRUTT Private Sub Form_Load() Utente.Nome = "Giovanni" Utente.Cognome = "Verdi" End Sub Private Sub Command1_Click() MsgBox Utente.Nome & " " & Utente.Cognome End Sub |
Archivio:ndexed | ||||
Lezioni | Commenta questa lezione | Invia la tua guida | Avviso per le nuove lezioni | Proponi un argomento |
Visual Basic Italia© copyright 2000 - tutti i diritti riservati |