From j.brain@ieee.org Thu Oct 10 11:16:25 EET DST 1996 Article: 60211 of comp.sys.cbm Path: news.cs.tut.fi!news.funet.fi!newsfeed.sunet.se!news01.sunet.se!sunic!02-newsfeed.univie.ac.at!news.ecrc.de!newsgate.compuserve.com!ix.netcom.com!news-peer.gsl.net!news.gsl.net!howland.erols.net!EU.net!uunet!in3.uu.net!pravda.aa.msen.com!conch.aa.msen.com!not-for-mail From: j.brain@ieee.org (Jim Brain) Newsgroups: comp.sys.cbm Subject: Commodore Trivia Edition #30 Answers Date: 8 Oct 1996 20:14:20 -0400 Organization: Brain Innovations, Inc. Lines: 174 Sender: brain@msen.com Message-ID: NNTP-Posting-Host: conch.aa.msen.com X-Newsreader: Yarn 0.90 with YES 0.22 X-URL: http://www.msen.com/~brain/ -------Commodore Trivia Edition #30 Questions and Answers Preface-------- Not to leave you in the dark for too long, here are the trivia answers to the previous edition of Commodore Trivia. I am posting the answers at this time, and will post the scores and winners in a few days. This time frame is set up to allow time for any discussions on the correctness of these answers. By this time, the newest edition of trivia has been posted. I encourage you to enter it. This edition of trivia answers has been posted to the USENET newsgroups: comp.sys.cbm, alt.folklore.computers, and comp.sys.amiga.advocacy. It has also been posted to the FidoNET CBM Echo. Feel free to use these trivia answers in newsletters, magazines, and other publications (please see disclaimer). If you use the trivia, I would appreciate knowing where it has ended up. If you intend to use this information, please wait a few days after the posting date to allow for major errors to be corrected. Please mail any new questions for upcoming trivia (with answers) to my address. This edition and previous editions the trivia can be obtained from my mailserver. To: brain@mail.msen.com Subject: MAILSERV Body: send trivia1 quit This will retrieve the first edition of the trivia. Replace the number with the edition you want. **NEW** Interested persons can now subscribe to the Trivia Mailing List. To add your name to the list, please mail a message: To: brain@mail.msen.com Subject: MAILSERV Body: subscribe trivia Firstname Lastname help quit Each new edition of the trivia will be automatically mailed to you when it is made available on the Internet. I try to post the answers for the questions shortly after the monthly contest has ended. However, I usually wait a few days for any errors I may have made to be worked out before scoring the contest. -------Commodore Trivia Edition #30 Questions and Answers (BEGIN)-------- The "BASIC" Trivia Set Q $1D0) To load a program from the current location on a cassette tape, what two key combination must a user press on a VIC-20 or C64. A $1D0) SHIFT and the RUN/STOP key. Note that the same key sequence loads a file from disk on the SX-64 or C128 in 128 mode. Q $1D1) If I issue the BASIC statement OPEN "JIM,S,W", What type of file am I opening? A $1D1) A sequential file. Q $1D2) Is BASIC in the Commodore computer systems an "interpreted" or "compiled" language A $1D2) interpreted. When a program has been "Blitzed!", it is then compiled. Q $1D3) What type of variable is A%? A $1D3) An integer variable. Q $1D4) If I issue the BASIC line PRINT:PRINT "A","B" what column does the "B" show up on when run on a C64? A $1D4) Column 11, if we number columns from 1. Q $1D5) What column does "B" show up on if I run the BASIC line in $1D4 on a VIC-20? A $1D5) Column 12. Since the VIC has 22 columns, the natural column spacing was 11 positions, instead of 10 on 40 and 80 column CBMs. Q $1D6) Alphebetically, what is the first BASIC 2.0 command to have a 3 letter abbreviation? A $1D6) CLOSE. Q $1D7) How many times does the statement FOR T=1TO0 execute? A $1D7) once. A BASIC for loop always executes at least once. This is different from languages like 'C', which would not execute the loop at all. Feature or bug, who knows... Q $1D8) What base does the BASIC LOG command use for its logarithm function? A $1D8) base e. (2.7....) (one of the entrants claims that "e" in the 64 isn't quite as accurate as we think. He was quoting 2.85.... Q $1D9) A = NOT B can be written as which expression: a) A = -B b) A = -(B+1) A $1D9) b. NOT computes the twos-complement of the number, not the simple ones-complement negation. This feature simpleifies subtraction in a CPU, since subtractions can be performed as additions. Q $1DA) What does INT(-15.43) return? A $1DA) -16. INT returns the next LOWER integer. Q $1DB) What does ASC$("JIM") return? A $1DB) ASC$ returns an error. That's what I get for writing these late at night. What I menat was "ASC", returns the value of the first character of a string, in this case 'J'. Since I didn't specify if this was a uppercase 'j' or lowercase 'J' in graphics mode, the result could either be 74 or 202. Q $1DC) What is the abbreviation for GET#? A $1DC) Technically, there is none. However, on the C128 at least, GET# shares the same token as GET, so typing gE# will indeed work. This is different from PRINT and PRINT#, which have different tokens. Q $1DD) What is the largest integer value that Commodore BASIC can handle? A $1DD) Again, this was a little ambiguous. I was looking for the maximum value that an integer variable can hold, which is 32767, but line numbers (which are integers) can be up to 63999. Q $1DE) What is the ONLY Commodore Editor key not affected by "quote mode" A $1DE) The DEL key. I would have answered return, but the 64 PRG spells it out that only this key is unaffected. Q $1DF) What is the range of RND? A $1DF) 0.0 <= RND < 1.0, or [0,1). Both mean that the range is from 0 to 1, including 0, but not 1.0. The information in this between the lines marked by (BEGIN) and (END) is copyright 1996 by Jim Brain. Provided that the information between the (BEGIN) and (END) lines is not changed except to correct typographical errors, the so marked copyrighted information may be reproduced in its entirety on other networks or in other mediums. For more information about using this file, please contact the address shown below. Jim Brain j.brain@ieee.org 10710 Bruhn Avenue Bennington, NE 68007 (402) 431-7754 --------Commodore Trivia Edition #30 Questions and Answers (END)--------- -- Jim Brain, Embedded System Designer, Brain Innovations, Inc. (BII)(offline sig) j.brain@ieee.org "Above views DO reflect my employer, since I'm my employer" Dabbling in WWW, Embedded Systems, VR, Old CBM computers, and Good Times! -Me- Jim Brain: BII, VR, and CBM info