QBasic 4.5 Variable Ranges?

SephirothSephiroth Fayetteville, NC, USA
It's been probably fifteen years since I played with QuickBasic, but I recently found my old copy of QuickBasic 4.5, and I decided I'd take a break from my C++ stuff for a week and work onan old 3D engine I had written in QB4.5 years ago. My problem, is that I cannot remember the value ranges for the various data types. I know that an INTEGER type goes from -32768 to 32767, but what about LONG, SINGLE, and DOUBLE?

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Comments

  • : It's been probably fifteen years since I played with QuickBasic, but
    : I recently found my old copy of QuickBasic 4.5, and I decided I'd
    : take a break from my C++ stuff for a week and work onan old 3D
    : engine I had written in QB4.5 years ago. My problem, is that I
    : cannot remember the value ranges for the various data types. I know
    : that an INTEGER type goes from -32768 to 32767, but what about LONG,
    : SINGLE, and DOUBLE?
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/gre
    : en][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h
    : [/red][/b][/italic]

    That information should be available in the online help within QBasic, if I remember correctly. If you don't have the full version, you can download it at http://www.qbcafe.net/qbc/english/download.shtml (the one they've got includes the online help).

    I've used Linux for so long that I almost forgot QBasic existed! A nice bit of nostalgia.

    Hope it helps!
    Sincerely,
    Jakykong (Jack Mudge)
    jack_mudge@hotmail.com
  • SephirothSephiroth Fayetteville, NC, USA
    : That information should be available in the online help within
    : QBasic, if I remember correctly. If you don't have the full version,
    : you can download it at
    : http://www.qbcafe.net/qbc/english/download.shtml (the one they've
    : got includes the online help).
    :
    : I've used Linux for so long that I almost forgot QBasic existed! A
    : nice bit of nostalgia.
    :
    : Hope it helps!
    : Sincerely,
    : Jakykong (Jack Mudge)
    : jack_mudge@hotmail.com

    I have the full version of 4.5 and have since the early 90's. I couldn't find it in the help that you use inside the old DOS IDE. If it is there, it is well hidden.

    I am also grabbing QB7.1 from that site, but am a bit curious as to what I'd gain by using it. I grew up with 4.5 and love it. Unless it is something critical, why should I use 7.1 over 4.5?

    *EDIT*

    I know it isn't related, but I noticed that running QB4.5 in Vista uses 100% of one CPU (Pentium D/3.40GHz) and in XP it uses 50% of one (P4/3.20GHz), but in 98SE on my old P2/233 it only uses about 5%. What the HECK are XP and Vista doing that causes QB to destroy CPU like that?

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
  • : : That information should be available in the online help within
    : : QBasic, if I remember correctly. If you don't have the full version,
    : : you can download it at
    : : http://www.qbcafe.net/qbc/english/download.shtml (the one they've
    : : got includes the online help).
    : :
    : : I've used Linux for so long that I almost forgot QBasic existed! A
    : : nice bit of nostalgia.
    : :
    : : Hope it helps!
    : : Sincerely,
    : : Jakykong (Jack Mudge)
    : : jack_mudge@hotmail.com
    :
    : I have the full version of 4.5 and have since the early 90's. I
    : couldn't find it in the help that you use inside the old DOS IDE.
    : If it is there, it is well hidden.
    :
    : I am also grabbing QB7.1 from that site, but am a bit curious as to
    : what I'd gain by using it. I grew up with 4.5 and love it. Unless
    : it is something critical, why should I use 7.1 over 4.5?
    :
    : *EDIT*
    :
    : I know it isn't related, but I noticed that running QB4.5 in Vista
    : uses 100% of one CPU (Pentium D/3.40GHz) and in XP it uses 50% of
    : one (P4/3.20GHz), but in 98SE on my old P2/233 it only uses about
    : 5%. What the HECK are XP and Vista doing that causes QB to destroy
    : CPU like that?
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/gre
    : en][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h
    : [/red][/b][/italic]

    Honestly, I was never impressed with 7.1. I didn't find much in the way of significant advantages over 4.5, and the language differs slightly between them. I'd stick to 4.5.

    In the mean time, I downloaded it and compiled DOSbox (got me nostalgic... darn it. I guess I'll be picking up QBasic again over the next few days...).

    The minmum and maximum limits are available under Help->Contents->Data Types (now that I had a chance to look for it). That page has a short table.

    [note that I can't cite any references for the following. I've heard these, but I really don't know for sure, so most of this may be total speculation.]

    I think 2K, XP, and Vista use the 8086-emu mode of the CPU to run any DOS program, and are just horribly inefficient at managing that mode. They probably figured, if you're using a DOS program, you probably don't need the machine to be doing much, so it affords that sort of inefficiency.

    If it were me, I'd grab a real copy of DOS and a processor emulator like qemu or bochs (or get DOSBox, if it runs in windows... I'm not sure that it does, though). If you're using 100% of your CPU, those programs WILL be more efficient, sadly. That doesn't mean they'll be as efficient as a real DOS box would be, simply because they're emulating a processor within a processor.

    Hope it helps!
    Sincerely,
    Jakykong (Jack Mudge)
    jack_mudge@hotmail.com
  • SephirothSephiroth Fayetteville, NC, USA
    : Honestly, I was never impressed with 7.1. I didn't find much in the
    : way of significant advantages over 4.5, and the language differs
    : slightly between them. I'd stick to 4.5.
    :
    Alright, that's what I figured, since Microsoft LOVES breaking their software between versions.

    : The minmum and maximum limits are available under
    : Help->Contents->Data Types (now that I had a chance to look for it).
    : That page has a short table.
    :
    Will check it out in a bit.

    : I think 2K, XP, and Vista use the 8086-emu mode of the CPU to run
    : any DOS program, and are just horribly inefficient at managing that
    : mode. They probably figured, if you're using a DOS program, you
    : probably don't need the machine to be doing much, so it affords that
    : sort of inefficiency.
    :
    : If it were me, I'd grab a real copy of DOS and a processor emulator
    : like qemu or bochs (or get DOSBox, if it runs in windows... I'm not
    : sure that it does, though). If you're using 100% of your CPU, those
    : programs WILL be more efficient, sadly. That doesn't mean they'll be
    : as efficient as a real DOS box would be, simply because they're
    : emulating a processor within a processor.
    :
    Why do that? I have a Tandy 486SX with 8MB of RAM running DOS 6.22 and Win3.11 in my computer room! I also have a P2/233 with 98SE, a P3/800 with 98SE, a Pentium 133 with 98SE, and a P3/866 with 98SE! I can do it for real. Just found the CPU usage odd. Oh, and I don't rent out my old machines. :p

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories