Article View: free.it.visual-basic
Article #3646Re: File a dimensione personalizzata
From: Maurizio Borrelli
Date: Mon, 20 May 2002 18:51
Date: Mon, 20 May 2002 18:51
42 lines
1936 bytes
1936 bytes
> "The_Pianist" [...]: > Vorrei fare un programma che crei un file di dimensione > da me specificate. > Ho provato con un FOR-NEXT che scriveva righe di > testo all'interno di un file con OPEN FOR OUTPUT > ma non sono rimasto molto soddisfatto. > avevo pensato a OPEN FOR BINARY ma sinceramente > non mi � molto chiaro il suo funzionamento. [...] > (il top sarebbe se funzionasse anche con Qbasic, ma non voglio complicare > le cose) QBASIC: DECLARE SUB Main () CALL Main SUB Main DIM iFile AS INTEGER DIM sFile AS STRING DIM lLen AS LONG DIM sDat AS STRING sFile = "D:\TEMP\MIOFILE.DAT" lLen = 10000 sDat = SPACE$(lLen) iFile = FREEFILE OPEN sFile FOR BINARY ACCESS WRITE AS #iFile PUT #iFile, , sDat CLOSE #iFile END SUB -- Ciao. Maurizio -------- ?SPQR(C) X --------
Technical Details
Message-ID:
<AwbG8.87612$5k4.1951451@twister2.libero.it>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mailReferences:
<mV9G8.86955$5k4.1934849@twister2.libero.it>Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII X-Google-Thread: f94ee,8f882164bb48851f X-Google-Attributes: gidf94ee,public X-Google-ArrivalTime: 2002-05-20 11:46:58 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!supernews.com!telocity-west!TELOCITY!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail From: "Maurizio Borrelli" <maurizio.borrelli@freepass.it> Newsgroups: free.it.visual-basic References: <mV9G8.86955$5k4.1934849@twister2.libero.it> Subject: Re: File a dimensione personalizzata Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <AwbG8.87612$5k4.1951451@twister2.libero.it> Date: Mon, 20 May 2002 20:51:32 +0200 NNTP-Posting-Host: 151.17.118.104 X-Complaints-To: abuse@iunet.it X-Trace: twister2.libero.it 1021920416 151.17.118.104 (Mon, 20 May 2002 20:46:56 MET DST) NNTP-Posting-Date: Mon, 20 May 2002 20:46:56 MET DST Organization: [Infostrada]