Basic

Moderators: None (Apply to moderate this forum)
Number of threads: 1675
Number of posts: 4764

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
It may be one of the daftest questions... Posted by Skaven on 14 May 2002 at 12:51 PM
Can you put a BASIC script into a web page???

~~ Skaven ~~
Report
Re: It may be one of the daftest questions... Posted by KDivad Leahcim on 15 May 2002 at 7:10 AM
: Can you put a BASIC script into a web page???
:
: ~~ Skaven ~~
:

No. vbScript is the closest you'll get.
Report
thanks Posted by Skaven on 15 May 2002 at 12:17 PM
: : Can you put a BASIC script into a web page???
: :
: : ~~ Skaven ~~
: :
:
: No. vbScript is the closest you'll get.
:
Yeah, I thought that would be the case.

~~ Skaven ~~
Report
Re: thanks Posted by delman on 22 Jun 2002 at 10:17 AM
: : : Can you put a BASIC script into a web page???
: : :
: : : ~~ Skaven ~~
: : :
: :
: : No. vbScript is the closest you'll get.
: :
: Yeah, I thought that would be the case.
:
: ~~ Skaven ~~
:

Actually, yes, you can use compiled .exe QB programs as CGI and I have done it before. Like any other CGI language, QB uses stdout so you can just PRINT your html data.

The problem is that unfortunately most commercial servers don't support 16-bit DOS applications for CGI (actually, most don't support any .exe programs). And most ISP's will probably laugh at you if you ask!

However, if you're talking about using your own server it shouldn't be a problem. I used Xitami (free compact server software, see www.xitami.com) and it worked fine. Otherwise, there is some 16-bit CGI gateways available if you already have a different server set up.

If you want some source code to see how its done once you have the server set up (eg. read in form data, etc), I'll post it - it's surprisingly very simple to do.
Report
Re: thanks Posted by KDivad Leahcim on 23 Jun 2002 at 3:49 AM
: : : : Can you put a BASIC script into a web page???
: : : :
: : : : ~~ Skaven ~~
: : : :
: : :
: : : No. vbScript is the closest you'll get.
: : :
: : Yeah, I thought that would be the case.
: :
: : ~~ Skaven ~~
: :
:
: Actually, yes, you can use compiled .exe QB programs as CGI and I have done it before. Like any other CGI language, QB uses stdout so you can just PRINT your html data.
:
: The problem is that unfortunately most commercial servers don't support 16-bit DOS applications for CGI (actually, most don't support any .exe programs). And most ISP's will probably laugh at you if you ask!
:
: However, if you're talking about using your own server it shouldn't be a problem. I used Xitami (free compact server software, see www.xitami.com) and it worked fine. Otherwise, there is some 16-bit CGI gateways available if you already have a different server set up.
:
: If you want some source code to see how its done once you have the server set up (eg. read in form data, etc), I'll post it - it's surprisingly very simple to do.
:

Except for one little detail:

Yes, QB can be used to output HTML (at least, I'm assuming you are right), but the question wanted it embedded in the page itself like vbScript of JavaScript can be. In that case, no, it can't be done.
Report
Re: thanks Posted by delman on 29 Jun 2002 at 10:45 AM
: : : : : Can you put a BASIC script into a web page???
: : : : :
: : : : : ~~ Skaven ~~
: : : : :
: : : :
: : : : No. vbScript is the closest you'll get.
: : : :
: : : Yeah, I thought that would be the case.
: : :
: : : ~~ Skaven ~~
: : :
: :
: : Actually, yes, you can use compiled .exe QB programs as CGI and I have done it before. Like any other CGI language, QB uses stdout so you can just PRINT your html data.
: :
: : The problem is that unfortunately most commercial servers don't support 16-bit DOS applications for CGI (actually, most don't support any .exe programs). And most ISP's will probably laugh at you if you ask!
: :
: : However, if you're talking about using your own server it shouldn't be a problem. I used Xitami (free compact server software, see www.xitami.com) and it worked fine. Otherwise, there is some 16-bit CGI gateways available if you already have a different server set up.
: :
: : If you want some source code to see how its done once you have the server set up (eg. read in form data, etc), I'll post it - it's surprisingly very simple to do.
: :
:
: Except for one little detail:
:
: Yes, QB can be used to output HTML (at least, I'm assuming you are right), but the question wanted it embedded in the page itself like vbScript of JavaScript can be. In that case, no, it can't be done.
:

Yeah you're right, you can't write QB "scripts" in the sense that a script is an uncompiled program. I guess I misread the question!
Report
Re: thanks Posted by KDivad Leahcim on 30 Jun 2002 at 8:05 AM
: Yeah you're right, you can't write QB "scripts" in the sense that a script is an uncompiled program. I guess I misread the question!
:

Then again, if you don't mind modifying input and file i/o routines, you would almost have vbScript from QB. Although vbScript is based on VB, VB is backwards compatible with most of QB, so they are all very similar.

I guess in summary:

Learn vbScript and use it.
-or-
Get your host to support 16bit DOS apps and use your QB exe for CGI. (Interesting idea that I hadn't thought of!)
Report
Re: thanks Posted by Skaven on 1 Jul 2002 at 11:52 AM
Thanks for you help. I normally use JavaScript or Python on my webpages because I have a good understanding of those languages. I also have a good understanding of GW BASIC and QBasic, that's why i asked.

And as I said... Thanks!!!


Report
Re: thanks Posted by Alex_Elderson on 2 Jul 2002 at 7:37 AM
one nice thing there is a web-side script called netbasic (from Novell).

it's like qbasic

: Thanks for you help. I normally use JavaScript or Python on my webpages because I have a good understanding of those languages. I also have a good understanding of GW BASIC and QBasic, that's why i asked.
:
: And as I said... Thanks!!!
:
:
:

Report
Re: thanks Posted by KDivad Leahcim on 2 Jul 2002 at 12:25 PM
: one nice thing there is a web-side script called netbasic (from Novell).
:
: it's like qbasic
:

Just out of curiousity, why not just use vbScript? Support is probably much wider and it's also still basic.
Report
Re: Thanks Posted by VB5begginner on 4 Aug 2002 at 11:30 AM
umm...vbscript pretty much is QBasic...its definately not "Visual"...as in where the V bart of the VBScript name came from...and almost every thing in Visual Basic came from QBasic...they're identical languages...just with a little improvement...but its the same thing... BASIC...

But...if you really wanted to, you could compile youre own BASIC script reader and embed it into IE yourself...of course visitors will need to download your components, but it can be done...if youre really interested then check out this link...
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/overview/overview.asp

but as i and others have said....it'd be easy enough just to use vbscript





: : one nice thing there is a web-side script called netbasic (from Novell).
: :
: : it's like qbasic
: :
:
: Just out of curiousity, why not just use vbScript? Support is probably much wider and it's also still basic.
:

Report
Re: Thanks Posted by KDivad Leahcim on 6 Aug 2002 at 5:36 AM
: umm...vbscript pretty much is QBasic...its definately not "Visual"...as in where the V bart of the VBScript name came from...and almost every thing in Visual Basic came from QBasic...they're identical languages...just with a little improvement...but its the same thing... BASIC...
:

So there's not a visual design environment (or is there? Probably is.). Big deal. VBS is much closer to VB than it is QB. To some extent, VBS is OO and can use ActiveX components and (I think) call APIs. QB can do none of those. Yes, QB has QLB's and LIB's, but that's not hardly the same.

As for the language, no they aren't identical. VB does still support many keywords and commands from QB, but most have been replaced or updated and some more are virtually useless unless you really want them. You might as well say that C and C++ are identical....
Report
Re: Thanks Posted by Skaven on 6 Aug 2002 at 10:24 AM
: : one nice thing there is a web-side script called netbasic (from Novell).
: :
: : it's like qbasic
: :
:
: Just out of curiousity, why not just use vbScript? Support is probably much wider and it's also still basic.
:

* /me opens 'Teach Yorself Javascript' *

Thanks for the help but from what I've seen, read and been told JavaScript is more widely used and cross-browser compatible. As for creating plugins and stuff - i'll think about it, but for the moment I'll JavaScript away.


Report
Re: It may be one of the daftest questions... Posted by eikedehling on 10 Aug 2002 at 6:06 AM
: : Can you put a BASIC script into a web page???
: :
: : ~~ Skaven ~~
: :
:
: No. vbScript is the closest you'll get.
:
You could write a BASIC-script interpreter for interfacing basic-scripts with CGI ... but that is quite hard ...

You could also compile your basic executable, and then interface directly with CGI. (look at some of the tutorials ... they are often for C/C++ but you can get the idea how to do so ...)


SUSE LINUX 7.3 PRO - The world starts behind windows




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.