It is possible to compile QuickBASIC code (i.e. a variant of BASIC that contrasts with (among others) GW-BASIC) via QuickBASIC 4.5 and PDS.
Often at the time, you could write some code using the free QBASIC which came with MS-DOS and then decide that you need to purchase one of those other programs to compile it prior to distributing it as a standalone executable.
I hadn't realised there was a non-free version of QBasic.
Also, I went to download QB64 and compile a very basic app then opened that inside a hex editor to see if the it was just a standalone exe interpreter with the .bas attached as a resource (a bit like how self extracting zip files work) and appears that QB64 does genuinely compile the code.
So I stand corrected on both the old and new instances of QBasic.
There is some strange stuff inside the QB64 generated exe though. References to automation.whatismyip.com (stranger still, that sub-___domain isn't DNSed).
QB64 is definitely a Window app that's written to look like it's running in DOS though. There's even a character map compiled into the exe so that the fonts look native to DOS. It also looked quite fun, so I can see the appeal of using QB64 for personal projects.
I know why it's using it. My point was firstly that it's odd (though not unforgivable) that the compiler links to those procedures even though my source .bas wasn't calling any networking APIs; and secondly that the sub-___domain doesn't even exist for the DNS lookup to work:
$ whois automation.whatismyip.com | head
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
No match for "AUTOMATION.WHATISMYIP.COM".
>>> Last update of whois database: Wed, 17 Apr 2013 10:58:41 UTC <<<
I even disassembled the binary so I could see the full HTTP header just in case the ___domain name was a red-herring.
> My point was firstly that it's odd (though not unforgivable) that the compiler links to those procedures even though my source .bas wasn't calling any networking APIs...
It's pretty common for compilers for niche languages to statically link the runtime library by default. Many think it eases distribution.
Yes I know this (and it's not just compilers for niche languages that does this either). But again, that wasn't my point. My point was this:
1. it's statically compiling in libraries for APIs that aren't even being used (again, I know this is pretty common as well - it was more said as a side issue since I was already on the topic of it's runtime). But most importantly:
2. because automation.whatismyip.com DOES NOT EXIST. The API is broken because it calls a non-existent sub-___domain name. The sub-___domain has no DNS record. It does not ping nor curl because it's completely imaginary....and so on. (sorry for the flippancy of the post, but this is now the 3rd time I'm having to reiterate myself so I just want to be clear that everyone understands my point)
automation.whatismyip.com used to exist; it's what whatismyip.com suggested you use when making a large number of easily parseable requests. I assume since the redesign (read: monetization attempt) it's disappeared.
Honestly, I've never heard of automation.whatismyip.com until today. But after Googling around a but, it looks like they've only taken that ___domain offline two or three months ago. So I guess the QB64 devs haven't been made aware yet (or haven't had time to update their WAN IP library yet).
No, QBasic is also a language variant. QBasic has functions, user-defined types, no line numbers, and a pretty big standard library that plain BASIC did not have.
Yeah I'm familiar with what QBasic is and many of the other BASIC dialects that preceded it (I'm old :P). I'd agree that it's a language variant / dialect. My issues is when people talk about QBasic as if it was it's own single entity. But then I guess where do you draw the line? eg by my same logic, C++ just a variant of C, yet it's clearly sane to describe them separately. So perhaps I was being overly picky.
As a side note, QBasic does support line numbers - albeit for legacy reasons and not recommended syntax. And some dialects of BASIC did support functions - though the syntax was awkward so I usually just used GOSUB / RETURN when I needed procedures with no return values.
The compiled point was wrong, I'd already conceded that. But that doesn't mean I have no idea what what you're doing. I just wrongly assumed that the QB64 devs would just embed the .bas inside the PE as a resource file rather than going to the trouble of writing a compiler. Honestly, I'm impressed they bothered given the niche appeal of the IDE and number of other BASIC compilers on the market (FreeBASIC, PureBASIC, PowerBASIC, VisualBasic, etc) - some of which so closely resemble QB64 that I had to disassemble the compiled binary just to make sure there wasn't some plagiarism involved.
> Honestly, I'm impressed they bothered given the niche appeal of the IDE
It reminds me a bit of the freepascal project. Beautiful compiler, tons of extensions (including generics: http://wiki.freepascal.org/Generics), graphical RAD IDE (Lazarus) ... yet relatively few people use it because C++ does all of that and more. Ultimately, I guess syntactic preference isn't really enough of a justification for yet another compiled imperative OOP language...
I know exactly what you mean. I used to love Pascal back in the 90s so installed Lazarus a few months ago with the intention of writing a few Qt apps. I think I spent 10 minutes in there at the time, thought "this is fun", and have never touched it again since.