Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
oVERFLOW
#11
Ralph,
I'm glad that you solved your problem with Ted's help.

Your posts have the following line at the end:
"Ralph, using QuickBASIC 4.5 and Windows XP ...."
This led me to believe tha you use QuickBasic 4.5, and not QBasic,
yet it seems from your examples that you are in fact using QBasic.

I use QuickBASIC 4.5 only, and compile my text programs.
Ted, is right, not using QBasic and the IDE, I am totally unfamiliar with
the "features" whereby the code is actually modified and the data type suffix can be added to a variable.
I wonder if the HELP for QB discusses these code changes made by the IDE.

Sorry if some of my QuickBASIC 4.5 examples and information didn't conform to the QBasic that you're using. Ted really identified my incompatibility problem.

I looked up LEN(variable), and found that I never used this form of LEN(),
only the form like LEN(A$) for strings.  I never needed it, but it seems that you did.

Good luck with your future endeavors.

Regards..... Moneo
Reply
#12
Moneo:

Thank you for your time, your explanations, and your sharing of knowledge with all here!

As to what I use, I do use QuickBASIC 4.5  (I have never used QBasic.), with Windos XP,  Home Edition, all as I state in my "signature.  I purposely state that information, so that I don't have to explain to anybody each time.  Oh, and I run the file, qb.exe, which, I assume, is the IDE that Ted has explained you don't use.  I never use a compiler that is not the one the IDE uses.  It is so easy!  Yes, I do all programming in the IDE, which let's me know if I have made a syntax error, among other helpful things.  And,  can run parts of the code as I write it, to check it out as I compose it.  For us amateurs, it's a real life saver.

As to the Help listing the changes as a number increases, I don't remember ever reading it, but that is not to say it doesn't contain that information.  Help is a little gem of information on qb.

Oops!  I thought LEN(number) would return the number of bytes it occupied.  So, I just ran a program to "prove" that.  Here it is:
Code:
CLS
a(1) = 11!
a(2) = 1.1
a(3) = 111111111
a(4) = 111111111111111#
FOR i = 1 TO 4
  PRINT a(i);
  PRINT LEN(a(i))
NEXT i
And, what were the results?  ALL FOUR NUMBERS GAVE A LEN(a(i)) OF 4!!!  Heh!

Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#13
(10-16-2008, 05:16 AM)Ralph link Wrote:Moneo:

Thank you for your time, your explanations, and your sharing of knowledge with all here!

As to what I use, I do use QuickBASIC 4.5  (I have never used QBasic.), with Windos XP,  Home Edition, all as I state in my "signature.  I purposely state that information, so that I don't have to explain to anybody each time.  Oh, and I run the file, qb.exe, which, I assume, is the IDE that Ted has explained you don't use.  I never use a compiler that is not the one the IDE uses.  It is so easy!  Yes, I do all programming in the IDE, which let's me know if I have made a syntax error, among other helpful things.  And,  can run parts of the code as I write it, to check it out as I compose it.  For us amateurs, it's a real life saver.

As to the Help listing the changes as a number increases, I don't remember ever reading it, but that is not to say it doesn't contain that information.  Help is a little gem of information on qb.
.....
Ralph,
Based on what you say, you are in fact using QBasic and not QuickBASIC 4.5, because you run QB.EXE, which is QBasic, which has the IDE as default, and you compile from the IDE.

QuickBASIC 4.5 and QBasic are almost the same. QuickBASIC 4.5 is a bit older, and has no IDE. You need to invoke the compiler from the MSDOS commandline or a batch file.

When using QuicjBASIC  4.5, you must compile since there is no such thing as running it in interpretive mode. However, your QBasic program can be run in interpretive mode, and sometimes the same program will not compile under QuickBASIC 4.5 because of memory limitations. Strange!

Curiously enough, the HELP in QBasic is basically the same in content as the QuickBASIC 4.5 manual, and the headings in this QBasic HELP say QuickBASIC 4.5.

I have a copy of QBasic and the HELP, which I keep for information. I did a scan of this HELP and found no information about the changing of data variable suffixes, or other changes that the IDE makes. As a matter of fact, I could find no reference to the IDE.

I suggest that you change your signature to say QBasic and not QuickBASIC 4.5, because this is really what you are using.

Regards..... Moneo

Reply
#14
Moneo:

I just took out my file, which I called QuickBASIC, from my cobwebby bookstand.  It contains five 5 1/4" floppes, each titled, Microsoft QuickBASIC", farther identified as "Version 4.5".  I bought it, bassed on a mailing, which was addressed to QuickBASIC Version 4.0 users, which started with:
"Dear Microsft QuickBASIC user:
We're proud to announce new Microsft QuickBASIC version 4.5 ..."

I sent the purchase price on 10-30-1988.  Most of my QuickBASIC 4.5 application files are dated 9/28/1998. The file, QB.EXE, is dated 9/28/1988 and is 278,804 bytes, shown as 273 KB by Windows XP.

Opening QB.EXE with Wordpad, and doing a Find "Version", I read, "QuickBASIC Version 4.5"

Based on the above, wouldn't you agree with me that I DO have QuickBASIC Version 4.5?

By the way, I did not receive a manual for QuickBASIC Version 4.5.  When was th manual produced?  And, why would an application called QBasic have "QuickBASIC version 4.5" in its Help file?  I don't think Microsoft would have been so careless!
===============================================================
Another thing, relating to my previous post, in which I got 4 for the length of all four values of a(1), a(2), a(3) and a(4).  After thinking about it some more, I decided to write a new program, as follows:

EDITED ON 16-08, 8:26 AM CT
I HAVE CORRECTED THE CODE, AS FOLLOWS:
Code:
'DIM a AS INTEGER
DIM b AS LONG
DIM c AS SINGLE
DIM d AS DOUBLE

PRINT N(a)
PRINT N(b)
PRINT N(c)
PRINT N(d)

The results I got were 2, 4, 4, and 8.  Now, that makes sense!

PLEASE NOTE THAT I HAVE EDITED MY CODE, WHICH WAS WRONG, AS I HAD ALL DIMs as INTEGERS!  SORRY.
Ralph, using QuickBASIC 4.5 and Windows XP Home Edition and Service Pack 2, with HP LaserJet 4L printer.
Reply
#15
Moneo, I can understand using the command line to compile, but why do you have such an adversion to the IDE? Plus you gotta get off that tequila lol. QB.EXE is Quickbasic 4.5.

Also, if anybody wants to try to LEN a number, you have to LEN a variable value of the number for it to work correctly. If the variable is a specific type then the following bytes are determined:

$        String     1 byte per character
%       Integer   2 bytes
!         Single    4 bytes
&        Long      4 bytes
#        Double   8 bytes

Ted
Get my QB demonstrator here: http://dl.dropbox.com/u/8440706/Q-Basics.zip
Reply
#16
Ralph and Ted,

You guys are probably right about QB.EXE being QuickBASIC and not QBasic. Back around 1988, Microsoft was putting out one version after another of QuickBASIC and QBasic and sending them to existing customers.

Since I never use QB.EXE and only compile using QuickBASIC's BC.EXE, I really can't say what "Basic" QB.EXE belongs to. I can only guess. Sorry if I assumed that it was QBasic.

Ted, regarding my not using the IDE, I did some testing when it was first sent to me, and I didn't like it. Please give me the benefit of the doubt to make my own decisions about this. It's simple. Having been programming for 27 years at the time (1988), I didn't like any editor or IDE that arbitrarily changed my code, no matter how well-intentioned.

Regards..... Moneo




Reply
#17
If you don't like the IDE, fine. Just don't start talking about how it works or how it doesn't!

We have had NUMEROUS arguments about number designations and you are usually DEAD WRONG! You have no concept of Singles or Doubles.

Stick to what you like. Talk about what you know. Don't try to FORCE people to believe that your way of thinking is the only way! People who ask questions are usually using the IDE because it IS helpful. I bet you didn't even read the Help Index!

I know that a lot of your compiled code had to be tossed away for stupid mistakes that the IDE could have easily caught first. Is that smart? Why would ANYBODY use a simple text editor when it comes free with the program?

Also compiling ALL of your code makes it utterly USELESS to newer programmers trying to learn something.
Get my QB demonstrator here: http://dl.dropbox.com/u/8440706/Q-Basics.zip
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)