Qbasicnews.com

QBasic => QB Discussion & Programming Help => Topic started by: Ralph on September 19, 2005, 01:26:37 PM



Title: Long remarks or instructions
Post by: Ralph on September 19, 2005, 01:26:37 PM
I seem to remember, possibly in BASIC, maybe in QuickBASIC, that one could use some magic word, then one could write a long paragraph of text, without having to remark each line.  Am I just dreaming?


Title: Long remarks or instructions
Post by: The walrus on September 19, 2005, 02:40:29 PM
Don't think you can do that..


Title: Long remarks or instructions
Post by: TheDarkJay on September 19, 2005, 03:00:12 PM
i think he means like in c++ where you put /n or \n (i'm not sure) and it goes to the next line...


Title: Long remarks or instructions
Post by: Ralph on September 19, 2005, 03:47:12 PM
The Dark Jay:
No, that would be the equivalent of a REM or a ' (single quote) in QuickBASIC preceding a line, making that a remark.  What I mean is a paragraph (one or more lines)!

The Walrus:
I was afraid of that.  It's just that this thought, that there was a way of doing this, doesn't want to leave me.  And, since I can't imagine this in any other program I might have used, I tend to think BASIC or QuickBASIC.  But, it might just be a dream in my mind!


Title: Long remarks or instructions
Post by: red_Marvin on September 19, 2005, 03:56:00 PM
AFAIK there is no such function, unless you put in an external file and
readd it in as GET fileno,1,s$ where s$ is a string of the same length
as the message.


Title: Long remarks or instructions
Post by: Ralph on September 19, 2005, 04:03:24 PM
red_Marvin:
Thank you, I'll accept the answer to my question as a unanimous NO, and end this here.


Title: Long remarks or instructions
Post by: Z!re on September 19, 2005, 04:28:34 PM
Code:
Const CRLF = chr$(13)+chr$(10)
print "Hello, "+crlf+"World!"+crlf+crlf+"This is what you meant?"


Title: Long remarks or instructions
Post by: Ralph on September 19, 2005, 04:49:59 PM
Z!re:
No, what I meant was somthing like this:
Code:

CLS
PRINT "Hi, ";
SPECIAL_QB_WORD
"The above special QuickBASIC word allows all that follows, enclosed in quotation marks, to be the equivalent of a series of remarks, without having to REMark out each line."
PRINT "Z!re"

Running the above program would only print out:

Hi, Z!re


Title: Long remarks or instructions
Post by: urger on September 19, 2005, 06:46:56 PM
Such a command does not exist in QB.
Sorry :(
However I do think such a thing is possible in FB using #DEFINE to create a macro that would perfom that function.

A few scant moments latter:
Code:
Print "Hello ";
#IF 0
This is a multline comment
This is still a multiline comment
And yet still
Yadda, yadda, yadda
#ENDIF
PRINT "World!"


Title: Long remarks or instructions
Post by: Z!re on September 19, 2005, 08:27:03 PM
Quote from: "Ralph"
Z!re:
No, what I meant was somthing like this:
Code:

CLS
PRINT "Hi, ";
SPECIAL_QB_WORD
"The above special QuickBASIC word allows all that follows, enclosed in quotation marks, to be the equivalent of a series of remarks, without having to REMark out each line."
PRINT "Z!re"

Running the above program would only print out:

Hi, Z!re
Ah, no.. that doesent exist.. you have to rem each line.. either with REM or '


Title: Long remarks or instructions
Post by: Moneo on September 22, 2005, 10:17:24 PM
Ralph,

In reality, the REM or ' preceding every line does not look bad and does not take that amount of extra effort. The following is an example of comments that I used to put at the beginning of every program back in the 1990's.
Code:

REM
REM             QUICKBASIC COMPILE AND LINK REQUIREMENTS
REM             ========================================
REM
REM **********************************************************************
REM
REM  Required QuickBASIC 4.5 Program/Library Files:
REM
REM  - BC.EXE       9-28-88  (QuickBASIC compiler)
REM  - PRO419.LIB  10-16-93  (QuickPak Professional library, Crescent Sw.)
REM  - BCOM45.LIB   9-28-88  (QuickBASIC alternate run-time-module library)
REM  - SMALLERR.OBJ 9-28-88  (QuickBASIC supplied object module)
REM  - LINK.EXE     9-07-88  (Microsoft Overlay Linker Version 3.69)
REM
REM **********************************************************************
REM
REM  The following command is used for QuickBASIC compilation:
REM
REM      BC /O progname,,progname;
REM
REM  The following command is used to LINK output of compilation and
REM  produce the .EXE executable program.
REM
REM      LINK /E/NOE progname+SMALLERR,,NUL,PRO419.LIB
REM
REM **********************************************************************