--------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200012 Date: 03/31/98 From: DAVID WILLIAMS Time: 10:20am \/To: BILL WHITE (Read 3 times) Subj: Old Folks -> IF NOT LEN(k$) THEN GOTO Again Hahahahaha!!! That will get you into all kinds of trouble! It will *not*, as you are obviously expecting, "GOTO Again" only if LEN(k$) is zero. What it will do is take LEN(k$), do a Boolean NOT - i.e. invert all the bits -, and execute the GOTO if the result is non-zero. In fact, the result of the NOT operation can be zero only if the LEN is -1, which is impossible. So the above bit of code will *always* execute the GOTO, irrespective of k$ or its LENgth. If X is a integer, X and NOT X are *both* regarded as "true" by BASIC for *all* values of X except 0 and -1. If X is 0, then X is "false", and if X is -1, NOT X is "false". Unless you are absolutely *certain* that you aren't going to fall into this kind of trap, it is far better to spell things out in full: IF LEN(k$) = 0 THEN GOTO Again or IF k$ = "" THEN GOTO Again Incidentally, in most BASICs, THEN GOTO can be written just as GOTO or as THEN. I forget whether QB allows this. dow --- PCBoard (R) v15.3 (OS/2) 5 * Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200013 Date: 03/31/98 From: DAVID WILLIAMS Time: 05:39pm \/To: DAVID ROTHSCHILD (Read 3 times) Subj: Multiple eofs -> How do I read/write files with multiple EOF's (like ZIPs or EXEs)? -> I'm writing an Encryption program, but it stops at the first EOF. I -> tried a FOR X = 1 to LOF..... but then I ran into an "Input past end -> of file", even when there was more file past the EOF. Forgive a "mere" Mac user, but how can a file have more than one EOF? In any (reasonable) DOS, EOF is *not* just an ASCII character. The stuff that is recorded on a disk is a whole lot more complex than it appears "through" the DOS. There are extra bits that are used for error detection and correction. And there are codes for things like EOF that do not represent any regular characters. The DOS handles everything, and provides the outside world with something that looks a whole lot simpler than what is really on the disk. It also ensures (or *should* ensure) that there is only one EOF in each file, at its very end. No? dow --- PCBoard (R) v15.3 (OS/2) 5 * Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200014 Date: 03/31/98 From: CHRIS GUNN Time: 01:39pm \/To: TYS ARMSTRONG (Read 3 times) Subj: Re: QBASIC TA> Could anyone give me the basic commands for QBASIC. Also I need to TA> nmake a high scores and questionare. Any help? Howdy Tys, Press and select Index. The QB help is hyperlinked and once you get the hang of moving around in it, it will teach you just about everything you need to know to get started programming. Chris --- FMail 0.96 * Origin: BIZynet - Worldwide Business via the E-Ways (1:15/55.1) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200015 Date: 03/31/98 From: KEVIN FROST Time: 07:46pm \/To: BOB LOTSPEICH (Read 3 times) Subj: bsave/bload I know how to save ansi graphics, i mean as in pictures you make on the screen using the ling statement or circle or pset. --- Platinum Xpress/Win/Wildcat5! v2.0 * Origin: Wizard's Tower, Toms River, NJ (732)-473-1933 (1:107/710) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200016 Date: 03/31/98 From: NIGEL TRAVES Time: 11:54am \/To: MARKUS TREINEN (Read 3 times) Subj: All my libs Greetings and felicitations Markus, NT> the /lqb switch. MT> You can also use only /L. QB45 loads QB.QLB automatically. It's MT> shorter ;) Well, it depends. If you load QB and then go through the file menu, it works fine just like you say. However, if like me you like to tell QB the .bas file to load from the command line you could have a problem. If you enter qb /l msmouse from the command line one of 2 things will happen. If you've got a library called msmouse then qb will load that and not the msmouse.bas file that you were expecting. If you haven't got a library with that name qb will tell you you've made an error 'cos it can't find it and will you please tell it where it can find it. As I may be editing and testing software over more than one session I habitually use the qb /lqb msmouse form, 'cos I can't be bothered with the file menu from within QB. Hope this clears things up. Byeee, Nigel. Ŀ Ŀ Ŀ Ŀ 1 1Ŀ 1 1Ŀ ٳ tarot@most-wanted.craybbs.co.uk $ 1 1 (messages only) 1 1 -+- OLMS 2.53 UNREG --- * Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200017 Date: 03/31/98 From: NIGEL TRAVES Time: 11:54am \/To: BOB LOTSPEICH (Read 3 times) Subj: Computer piracy Greetings and felicitations Bob, NT> I found the following in the QB scrapbook, vol 1 issue 3. Hope it is NT> of use. NT> Subject: Copyright laws in the USA BL> ..snip.. BL> Well done, and great research, Nigel! A copy has been saved for my BL> records! Thanks. Nah! I knew I had that file somewhere, it just took a little searching that's all. And If you read Chris Gunn's reply to me, it would seem that the guy who wrote it may have been wrong anyway. Hey, how should I know what the copyright laws are in the USA, I'm in the UK and I was only quoting already . Thanks for the praise, but it may have been a little early. Cest la vie. Byeee, Nigel. -+- OLMS 2.53 UNREG --- * Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200018 Date: 03/31/98 From: NIGEL TRAVES Time: 11:54am \/To: CHRIS GUNN (Read 3 times) Subj: Computer piracy Greetings and felicitations Chris, NT> Publication (posting in the echo, giving to a friend, uploading to a NT> BBS) of your work without a copyright notice puts the work in the NT> public domain. CG> Howdy Nigel, CG> Don't know where this guy's opinions came from. [cut] Being in the UK I wouldn't know. I have to rely on what I read. I only posted that file 'cos it was from a guy your side of the water and I was trying to be helpful (the cry of the damned ). Having re-read the piece that you quoted (reproduced at the top here), I'm just wondering if the guy got mixed up with UK patent law. Here, you cannot patent anything if a full description has already appeared in a book, magazine etc. before the application was made. It is regarded to be in the public domain as far as patents go, but not copyright. So if someone had tried to patent the LZW algorithm (as in the GIF compression routine) here they wouldn't have been able to, even if you could patent algorithms here. CG> That's why you'll see me post a P.S. now and then with words to the CG> effect that what I post here may be considered public domain and CG> credits are not needed. My personal opinion is that if I am going to post something in a public forum, what I post is PD. Until I can think of a killer application to write that is . I just enjoy programming and I also like the little bit of fame that goes with it (nah! my ego's *not* quite as big as my mouth ... yet!). But, hey that's just my opinion, I ain't going to force them on anyone. Byeee, Nigel. Ŀ Ŀ Ŀ Ŀ 1 1Ŀ 1 1Ŀ ٳ tarot@most-wanted.craybbs.co.uk $ 1 1 (messages only) 1 1 -+- OLMS 2.53 UNREG --- * Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200019 Date: 03/31/98 From: NIGEL TRAVES Time: 11:54am \/To: ALL (Read 3 times) Subj: CURSOR.BI 1/3 '>>> Page 1 of CURSOR.BI begins here. TYPE:BAS REM ****************************************************** REM * Filespec : cursor.bas cursor.bi * REM * Date : October 13 1997 * REM * Time : 13:25 * REM * Revision : 1.01B * REM * Update : March 26 1998 * REM ****************************************************** REM * Programmer: Nigel Traves * REM * Address : 5 Breamer Road, Collingham, Newark, * REM * : Notts, U.K. * REM * Post Code : NG23 7PN * REM ****************************************************** REM * Released to the Public Domain * REM ****************************************************** REM ****************************************************************** REM * This library is for the control of the hardware text cursor * REM * and as such there is no guaratee of fitness for the use of any * REM * of the routines presented here for use on any of the graphics * REM * screens i.e. they have only been tested on the 80 x 24 colour * REM * text screen. * REM ****************************************************************** DECLARE SUB InitCursor() REM ****************************************************************** REM * Sets a small number of internal variables to initial values - * REM * assumes SCREEN 0. Must be called before any other routine in * REM * this library. * REM ****************************************************************** DECLARE SUB SetLimits ( MaxY%, MaxX% ) REM ****************************************************************** REM * The routine InitCursor assumes that you have a maximum screen * REM * width of 80 characters and a screen height of 25. If you do * REM * wish to use these values, call this routine to set the * REM * maximum values to be used by the cursor movement routines in * REM * this library. In which case this routine must be called * REM * *after* InitCursor and before any other routine in this lib. * REM ****************************************************************** REM ****************************************************************** REM * The next 10 routines are the cursor movement routines and all * REM * but one of them move the cursor relative to its current * REM * position. Also, all but one the following routines expect * REM * the arguments that are passed to them to be positive i.e. no * REM * negative numbers. * REM ****************************************************************** DECLARE SUB CursorUpByOne() DECLARE SUB CursorUp ( By% ) DECLARE SUB CursorDownByOne() DECLARE SUB CursorDown ( By% ) DECLARE SUB CursorLeftByOne() DECLARE SUB CursorLeft ( By% ) DECLARE SUB CursorRightByOne() DECLARE SUB CursorRight ( By% ) DECLARE SUB MoveCursorRelative ( ByX%, ByY% ) REM ****************************************************************** REM * This is the cursor movement routine that will accept both * REM * positive and negative numbers. To move left pass a negative * REM * value in ByX% and a positive one to move right. To move up * REM * pass a negative value in ByY% and a positive one to move down. * REM ****************************************************************** DECLARE SUB MoveCursorAbsolute ( ToY%, ToX% ) REM ****************************************************************** REM * This is identical to LOCATE ToY%, ToX% and is included for * REM * completeness. * REM ****************************************************************** DECLARE SUB HomeCursor() REM ****************************************************************** REM * Move cursor to 1,1 * REM ****************************************************************** '>>> Page 1 of CURSOR.BI ends here. Continued on next page. -+- OLMS 2.53 UNREG --- * Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200020 Date: 03/31/98 From: NIGEL TRAVES Time: 11:54am \/To: ALL (Read 3 times) Subj: CURSOR.BI 2/3 '>>> Page 2 of CURSOR.BI begins here. DECLARE SUB CursorToEndOfScreen() REM ****************************************************************** REM * Move Cursor to MaxX, MaxY * REM ****************************************************************** DECLARE SUB CursorToTopOfScreen() REM ****************************************************************** REM * Move cursor to CurrentX, 1 * REM ****************************************************************** DECLARE SUB CursorToBottomOfScreen() REM ****************************************************************** REM * Move cursor to CurrentX, MaxY * REM ****************************************************************** DECLARE SUB CursorToStartOfLine() REM ****************************************************************** REM * Move cursor to 1, CurrentY * REM ****************************************************************** DECLARE SUB CursorToEndOfLine() REM ****************************************************************** REM * Move cursor to MaxX, CurrentY * REM ****************************************************************** DECLARE SUB SaveCursorPosition() REM ****************************************************************** REM * Saves the cursor position. The cursor can be saved up to 100 * REM * times * REM ****************************************************************** DECLARE FUNCTION RestoreCursorPosition% () REM ****************************************************************** REM * As long as at least one cursor position has been saved, * REM * restores the last saved cursor position. Returns TRUE if * REM * successful, otherwise FALSE * REM ****************************************************************** DECLARE FUNCTION CursorPositionSaved% () REM ****************************************************************** REM * If any cursor positions have been saved this routine will * REM * return TRUE otherwise FALSE. * _ ' * REM ****************************************************************** DECLARE SUB HideCursor() REM ****************************************************************** REM * Increments a counter and if cursor was on display removes it. * REM ****************************************************************** DECLARE SUB ShowCursor() REM ****************************************************************** REM * If the cursor is hidden this routine decrements the counter * REM * and if it is zero the cursor is put on display again. * REM ****************************************************************** DECLARE SUB RevealCursor() REM ****************************************************************** REM * If the cursor is hidden this routine immediately puts it back * REM * on display sets the counter to zero. * REM ****************************************************************** REM ****************************************************************** REM * The following six routines set the cursor to one of six * REM * standard shapes. Does not affect the status of a hidden * REM * cursor. * REM ****************************************************************** DECLARE SUB UnderLineCursor() DECLARE SUB OverLineCursor() DECLARE SUB MidLineCursor() DECLARE SUB BottomHalfBlockCursor() '>>> Page 2 of CURSOR.BI ends here. Continued on next page. -+- OLMS 2.53 UNREG --- * Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509) --------------- FIDO MESSAGE AREA==> TOPIC: 125 QUICK BASIC Ref: F4200021 Date: 03/31/98 From: NIGEL TRAVES Time: 11:54am \/To: ALL (Read 3 times) Subj: CURSOR.BI 3/3 '>>> Page 3 of CURSOR.BI begins here. DECLARE SUB TopHalfBlockCursor() DECLARE SUB FullBlockCursor() '>>> Page 3 of CURSOR.BI ends here. Last page. -+- OLMS 2.53 UNREG --- * Origin: Most Wanted BBS +44 (0)1522 887627 & 887628 * (2:2503/509)