中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-14 23:27
47,812 topics / 349,917 posts / today 0 new / 48,268 members
DOS开发编程 & 发展交流 (开发室) » Another newbie QBASIC question~
Printable Version  1,491 / 8
Floor1 jo Posted 2002-11-26 00:00
初级用户 Posts 22 Credits 172
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~
Floor2 jo Posted 2002-11-27 00:00
初级用户 Posts 22 Credits 172
Is nobody going to answer my question? 55555~
Floor3 随风顺 Posted 2002-11-27 00:00
初级用户 Posts 35 Credits 196
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
Floor4 jo Posted 2002-11-27 00:00
初级用户 Posts 22 Credits 172
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~
Floor5 jo Posted 2002-11-28 00:00
初级用户 Posts 22 Credits 172
A little bump~
Floor6 jo Posted 2002-11-29 00:00
初级用户 Posts 22 Credits 172
Another bump~sorry~
Floor7 jo Posted 2002-12-01 00:00
初级用户 Posts 22 Credits 172
Floor8 Wengier Posted 2002-12-01 00:00
系统支持 Posts 10,521 Credits 27,736
What do you mean?
Floor9 ko20010214 Posted 2002-12-02 00:00
版主 Posts 1,628 Credits 7,296
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.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023