Liberty BASIC Community Forum
« (Windows 10) Notepad »

Welcome Guest. Please Login or Register.
Feb 18th, 2018, 3:42pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: (Windows 10) Notepad  (Read 97 times)
Chester
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx (Windows 10) Notepad
« Thread started on: Jan 28th, 2018, 9:51pm »

open "myfile.txt" for output as #myHandle
print #myHandle, "Hello"
print #myHandle, "World"
close #myHandle

My Chapter Seven lesson (Reading and Writing Sequential files Part 1:

Tells me run this small program and open Notepad on myfile.txt to see the result.
Can anyone give me steps to do this?

Thanks,
Chester
« Last Edit: Jan 29th, 2018, 10:21pm by Chester » User IP Logged

tsh73
Board Moderator

member is online

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1745
xx Re: (Windows 10) Notepad
« Reply #1 on: Jan 29th, 2018, 12:28am »

Run this.
Code:
'open a file and print some information into it
open "numbers.txt" for output as #numbers
for x = 1 to 10
print #numbers, x
next x
close #numbers

notice "This is first writing to the file"
run "notepad.exe numbers.txt"

'now rewrite the file, replacing its contents
open "numbers.txt" for output as #numbers', x   'no ",x" here
for x = 11 to 20
print #numbers, x
next x
close #numbers

notice "This is second writing to the file"
run "notepad.exe numbers.txt"
end
 
User IP Logged

damned Dog in the Manger
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls