Xref: utzoo alt.religion.computers:2549 comp.windows.ms.programmer:3262 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!slxsys!ibmpcug!dylan From: dylan@ibmpcug.co.uk (Matthew Farwell) Newsgroups: alt.religion.computers,comp.windows.ms.programmer Subject: Re: ap, Windows BASIC Message-ID: <1991Jun23.160112.9779@ibmpcug.co.uk> Date: 23 Jun 91 16:01:12 GMT References: <1991Jun20.034205.2661@maverick.ksu.ksu.edu> <7451@vela.acs.oakland.edu> <1991Jun22.040758.9453@maverick.ksu.ksu.edu> Reply-To: dylan@ibmpcug.CO.UK (Matthew Farwell) Followup-To: alt.religion.computers Organization: The IBM PC User Group, UK. Lines: 38 In article <1991Jun22.040758.9453@maverick.ksu.ksu.edu> rogerhef@matt.ksu.ksu.edu (Roger Heflin) writes: >In <7451@vela.acs.oakland.edu> awesley@vela.acs.oakland.edu (WESLEY ANTHONY ) writes: >>This is great stuff! Is this going to rec.humor.funny? How do I >>force QBasic to flag an undeclared variable as an error. If I mistype >>a long variable, no error message, just a new variable. Didn't everyone >>figure out this was a Bad Feature (TM) in a programming language way >>back around FORTRAN-66 or so? >Can you find me a language that will warn you if you mistype a variable? >Without using something like lint. C assumes you knew what you were doing. >Is QB wrong for making that assumption, at least QB doesn't let you mix >your strings and numeric variables up. By default C has that Bad Feature >that you mentioned. $ cat > x.c #include int main(void) { int foobar; fooabr = 1 ; /* <-- notice misspelling */ printf("%d\n", foobar); return 0; } $ gcc x.c x.c: In function main: x.c:7: `fooabr' undeclared (first use this function) x.c:7: (Each undeclared identifier is reported only once x.c:7: for each function it appears in.) Does this count as 'assumes you know what you were doing'? Dylan. -- Matthew J Farwell: dylan@ibmpcug.co.uk || ...!uunet!ukc!ibmpcug!dylan But you're wrong Steve. You see, its only solitaire.