China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 20:37
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Another newbie QBASIC question~ View 1,395 Replies 8
Original Poster Posted 2002-11-26 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 22
Joined 2002-11-04 00:00
23-year member
UID 155
Gender Male
Status Offline
I'd like to ask a question: I want to use QB to write a simple notepad, but I ran into a problem:
cls
input "",a$
open "c:\1.txt" for append as #1
print #1,a$
close #1
end
But this program can only input 255 (about that many) letters. Is there any other way to make it not be limited by the number of characters~
Floor 2 Posted 2002-11-27 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 22
Joined 2002-11-04 00:00
23-year member
UID 155
Gender Male
Status Offline
Is nobody going to answer my question? 55555~
Floor 3 Posted 2002-11-27 00:00 ·  中国 河南 信阳 联通
初级用户
Credits 196
Posts 35
Joined 2002-10-14 00:00
23-year member
UID 5
Gender Male
Status Offline
The Input command is limited by the input buffer

If it's just simple input and you don't need to edit it, you can try this:

cls
txt$=""
in$=inkey$
while in$"^z"
txt$=txt$+in$
print in$;
sleep
in$=inkey$
wend
open "c:\1.txt" for append as #1
print #1,txt$
close #1
end

You should be able to input at least 65535 characters; use the F6 key or Ctrl+Z to exit and save
http://ie.zzu.edu.cn
Email:Jathenal@mail.edu.cn
QQ:26165434 希望能和大家做个朋友
Floor 4 Posted 2002-11-27 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 22
Joined 2002-11-04 00:00
23-year member
UID 155
Gender Male
Status Offline
Sorry to trouble everyone again, but I want one that can be edited, otherwise if I accidentally type a wrong character, what should I do? How should I modify it? Thanks~
Floor 5 Posted 2002-11-28 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 22
Joined 2002-11-04 00:00
23-year member
UID 155
Gender Male
Status Offline
A little bump~
Floor 6 Posted 2002-11-29 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 22
Joined 2002-11-04 00:00
23-year member
UID 155
Gender Male
Status Offline
Another bump~sorry~
Floor 7 Posted 2002-12-01 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 172
Posts 22
Joined 2002-11-04 00:00
23-year member
UID 155
Gender Male
Status Offline
Floor 8 Posted 2002-12-01 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
What do you mean?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 9 Posted 2002-12-02 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
If you really want to learn QB, you'd better first buy a book and learn how to "program" before anything else. First of all, you have to be familiar with the statements in QB and know how to use them. You have to know when to use conditional statements. And how to use them. Better buy a book and read through it yourself first, then come back and ask questions.
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Forum Jump: