🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #2778

Re: leggere un file

#2778
From: Rebis
Date: Thu, 06 Feb 2003 18:13
26 lines
1774 bytes
"Trix" <compton@inwind.it> ha scritto nel messaggio
news:XPd0a.87096$ZE.2377938@twister2.libero.it...
> Ciao a tutti
> dovrei leggere da un file delle stringhe di valori interi. come fare??
>

Per prima cosa apri il file in modalit� random specificando come lunghezza
di record la lunghezza (per esempio in byte) dei numeriinteri che vuoi
leggere:

Open "nome_file" For Random As #1 Len = Lunghezza_in_byte

Dopodich� scriverai un ciclo del tipo:

Dim Posizione, Numero_letto as Long

Posizione = 1
Do
    Get #1, Posizione, Numero_letto
    Posizione = Posizione + 1
    'Istruzioni per l'elaborazione del numero letto
Loop until EOF(1)
Close #1

Ciao, Rebis.
Technical Details
Message-ID: <_Ax0a.89193$YG2.2505883@twister1.libero.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.mailgate.org!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail
References: <XPd0a.87096$ZE.2377938@twister2.libero.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,c44d8e41ac47ca92
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2003-02-06 10:14:04 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.mailgate.org!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail
From: "Rebis" <djrebis@libero.it>
Newsgroups: free.it.visual-basic
References: <XPd0a.87096$ZE.2377938@twister2.libero.it>
Subject: Re: leggere un file
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Message-ID: <_Ax0a.89193$YG2.2505883@twister1.libero.it>
Date: Thu, 06 Feb 2003 18:13:14 GMT
NNTP-Posting-Host: 151.24.172.153
X-Complaints-To: abuse@libero.it
X-Trace: twister1.libero.it 1044555194 151.24.172.153 (Thu, 06 Feb 2003 19:13:14 MET)
NNTP-Posting-Date: Thu, 06 Feb 2003 19:13:14 MET
Organization: [Infostrada]