Qbasicnews.com
April 09, 2020, 07:14:54 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Print and "?"  (Read 2615 times)
Jark
Ancient Guru
****
Posts: 566



WWW
« on: March 06, 2003, 11:59:05 AM »

I just learnt a tip which is quite curious... When you type "?", Qb replaces it automatically by "PRINT".

Two questions :
1) Was that intentionally programmed in QB ?
2) Are there other tips of that kind ?
Logged

hink Global, Make Symp' All !
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #1 on: March 06, 2003, 12:09:52 PM »

Yeah, it was hardcoded inside QB. It worked in GW-Basic and Locomotive Basic interpreters, as well, and I think that in MSX-Basic and C64 Basic as well. It is somewhat old and just to save time.

As for more shortcuts... I don't know about anything but that ?.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
NovaProgramming
Been there, done that
*****
Posts: 1025



« Reply #2 on: March 06, 2003, 02:55:28 PM »

seriously?  If you type in ?  it automatically changes to PRINT!?   jeez that is weird I didn't know that and I've been fiddling with QBASIC for like 5 years now!
Logged

ovaProgramming.

One night I had a dream where I was breaking balls.  The next morning, BALLSBREAKER was born.

Quote from: "Haye, Phillip J."
 Excellent.  Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Antoni Gual
Na_th_an
*****
Posts: 1434



WWW
« Reply #3 on: March 06, 2003, 07:12:02 PM »

"?" comes from the first basic ever       http://www.truebasic.com

Be careful, in QB it only works because IDE changes them automatically to PRINT. If you write your program with an editor and compile it from the command line, the compiler will issue errors at every ?
Logged

Antoni
Zack
*/-\*
*****
Posts: 3974



WWW
« Reply #4 on: March 06, 2003, 09:12:14 PM »

heh...i discovered the ? trick a few months ago when I was trying to find easter eggs in the IDE  :bounce:
Logged

f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
toonski84
__/--\__
*****
Posts: 2567



« Reply #5 on: March 06, 2003, 10:00:07 PM »

there is one easter egg in the ide that displays credits, but you need a very, very, slow computer to pull it off.  i spent two hours in a dos emulator on the slowest setting trying to activate it.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #6 on: March 06, 2003, 10:36:53 PM »

what is it?
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
toonski84
__/--\__
*****
Posts: 2567



« Reply #7 on: March 06, 2003, 10:44:22 PM »

oh, geez, you had to press some key combo between the time the program was executed and the ide started.  for this to be even long enough, you had to have an 8088.  i think it was all the control, alts, and shifts.  it only worked in qb 1.0, too.  


according to a search on google, the same thing happens supposedly if you type in 'pcopy 0, 1' into the immediate window when you first start qb up, but to be honest it's not much of an easter egg, the programmer's names just fly into the screen in a text demo.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #8 on: March 06, 2003, 10:57:59 PM »

one could just use the program "slowmo" to make it slow as a turtle!

pcopy 0,1 doesn't work in qbasic OR qb :|
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #9 on: March 07, 2003, 12:34:35 AM »

I have a 8088... I have QBasic 1.0... I will try it Smiley
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!