---------------------------------------------------------------------------- FUTUREBASIC FAQ release version 1.3 - JUNE 8, 1996 ---------------------------------------------------------------------------- INTRODUCTION This document is intended to provide information about FutureBasic, a BASIC development environment for the Macintosh computer. Any references to specific products, either hardware or software, are used as information only and are not intended as an infringement upon the trademark holder. Any comments, questions, or corrections to this document should be sent to Floris van Sandwijk (florisvs@utrecht.knoware.nl, or preferably to my new e-mail address sandwijk@tref.nl). If you have any topics or questions you think should be answered here, submit them to the above address. This FAQ can also be obtained via e-mail to the above address as well. Part of this FAQ (especially the text in chapters 5 and 6) has been copied (and adapted) from a previous FAQ by Michael Guzzo (GuzzoM@aol.com) which - as far as I know - is not currently supported. I thank Michael Guzzo for his previous FAQ which saved me a lot of initial work. I also want to thank Mike Lambert (paumic@ids.net) for allowing me to use information he published on his website. Any code examples listed in the FAQ are for illustration only and are not guaranteed for form, function, error checking, etc. The author is neither affiliated with STAZ Software, Inc., nor compensated by STAZ Software, Inc. for any praise of FutureBasic; or for that matter, with any of the other companies mentioned in this FAQ. Document History: March 3, 1996: Initial release April 17, 1996: version 1.1 May 17, 1996, version 1.2 June 8, 1996, version 1.3 INDEX 1. Software 2. On line FB resources 3. Other FB resources and literature 4. Vendor addresses 5. FB Programming environment 6. Developing applications with FB 7. Real FB FAQs ---------------------------------------------------------------------------- 1. SOFTWARE a. Main software FutureBasic II available from STAZ Software, Inc. latest update: 2.1.3 b. Utility software Program Generator bundled with FutureBasic II available from STAZ Software, Inc. latest update: 4.1.5 FlashWindows 2.0 Window Generator Available from ...By Design, Inc. FN Graph Graphing Program Available from ...By Design, Inc. FutureFILE Example database created in 20 minutes. Available from ...By Design, Inc. CDEF-City vol. 1 & 2 Unique Controls (Buttons, Sliders) No longer available from Ariel Publishing, Inc. Has reverted back to the original owner. The Menu Mill No longer available from Ariel Publishing, Inc. Has reverted back to the original owner. QDFx Transitional Animations Available from Ariel Publishing, Inc. Function Junction II Available from Ariel Publishing, Inc. Project Tracker No longer available from Ariel Publishing, Inc. Has reverted back to the original owner. FBSpriteWorld 1.05b.cpt Sprite Animation ToolKit Freeware available on the Internet An updated version is bundled with FutureBasic II ToolBuddy A toolbar for easy access to commands, timed demo for 14 days, amazing tool!!! Mel Patrick ---------------------------------------------------------------------------- 2. ON LINE FB RESOURCES a. FTP Sites ftp://ftp.geko.com.au/pub/future-basic/ This site is essentially available in Australia only. ftp://ftp.associate.com/BEST OF A_MUG '95/'95 A_MUG FILES/Programming/ FutureBasic/ 21 FB Files from the 1995 AMUG CD ftp://ingrimayne.saint.joe.edu This site is dying. * ftp://tirpitz.ibg.uit.no/pub/future.hqx The site is now gone. The link is to the complete hqxed FutureBasic directory, containing all its files. Its 6800K. It's resources will be moved to the site of the unofficial Future Basic Web Site, and to Ariel's site. ftp://suniams1.statistik.tu-muenchen.de/pub/mac/FutureBasic/ German site containing over seventy FB programs ftp://ftp.associate.com/Best of A_MUG '96/'96 A_MUG Files/Programming/FutureBasic/ 9 FB Files from the 1996 AMUG CD b. Web Sites http://www.ids.net/~paumic/FutureBasic/ The unofficial FB WWW page, with code, chat possibilities and a lot of resources * http://www.syncentral.com/staz/ (This location has been replaced by the site directly below) http://www.stazsoftware.com/ Staz Software's Web Site http://www.arielpub.com Ariel Publishing's Web Site http://associate.com/bbs_mug.html An archive of the FB mailing list http://www.vivanet.com/~shepardb/fb/FBHome.html A Q&A FB Site http://www.mactech.com/Articles/Vol.09/09.05/FutureBASIC.bhtml A FutureBasic review by MacTech Magazine http://home.earthlink.net/free/croushorn/webdocs/futurebasic.html A site run by John Croushorn, which contains a form where you can ask questions on FB http://www.st.rim.or.jp/~gkt/future.html a small FB page in Japan run by Gaku (Manabu) Tomiyama . On this site a copy of this FAQ is available. http://www.macworld.com/pages/july.96/Reviews.2203.html A review of FutureBasic II in MacWorld Magazine, July 1996. c. FB Mailing list The old FB Mailing list has been down since mid March '96 (actually since shortly after I published the first edition - I hope there isn't any connection). Information about this list appears directly below. After that information on the new FB Mailing list is given. (old list information) futurebasic@zonk.geko.com.au. To join the Futurebasic list, please use the following. mail listserv@geko.com.au Subject: anything can go here. subscribe futurebasic YourFirstName YourLastName Please make sure you use your real name and not the example above. To unsubscribe, again... mail listserv@geko.com.au Subject: anything can go here.. unsubscribe futurebasic To post comments or queries about FB, to the list: futurebasic@geko.com.au (new list information) To join the Futurebasic list, send e-mail to the following address. To: macjordomo@associate.com Subject: (blank) Body: subscribe futurebasic YourFirstName YourLastName Please make sure you use your real name and not the example above. To unsubscribe, again... To: macjordomo@associate.com Subject: (blank) Body: unsubscribe futurebasic To post comments or queries about FB, to the list: futurebasic@associate.com d. CompuServe GO MACDEV The second message area deals with various Basics for the Mac, among which Future Basic. In the corresponding file area programs and/or code are made public on a regular basis. e. America On Line (AOL) There is a discussion group on AOL. STAZ can be found at keyword Ariel. However, I cannot get AOL over here in the Netherlands, so I have no details at the moment. Maybe somebody can enlighten me. f. Relevant e-mail addresses STAZ Software, Inc. (through the Internet) tech@stazsoftware.com (Technical questions) linda@stazsoftware.com (Ordering & product info) staz@stazsoftware.com (The STAZ) andy@stazsoftware.com (STAZical Engineer) (through America On Line) STAZology (Technical questions) STAZInfo (Ordering & product info) Staz (The STAZ) Ariel Publishing, Inc. orders@arielpub.com (Orders) editor@arielpub.com (Editor of IB) info@arielpub.com (Information on Ariel Publishing) arielpub1@aol.com (Ariel Publishing via AOL) Sentient Fruit turovich@aol.com g. Application Homepages * Bulkrate http://www.digitalpopcorn.com/bulkrate/ "BulkRate" is an offline mail-reader for FirstClass BBS's by Greg Neagle * Soundex http://www2.vivid.net/~bonafide/soundex.html "Soundex" translates words into their Soundex equivalents * Surge http://members.aol.com/jcooke3120/Surge.html "Surge" is a program to calculate and show storm and hurricane paths. ---------------------------------------------------------------------------- 3. OTHER FB RESOURCES AND LITERATURE a. Inside Basic Magazine No longer available from Ariel Publishing, Inc. Inside Basic Magazine was devoted entirely to Macintosh BASIC programming, which at the moment is concentrated in Future Basic. Inside Basic Magazine was available on paper, on disk or via the Internet. The disk and Internet versions came with source code. On Friday, April 26th, 1996 Inside Basic has officially - and unfortunately - ceased publication. Back-issues are still available. A CD-ROM containing the complete set of Inside Basic issues has been announced, but is not yet available. b. BASIC 101 An Introduction to Macintosh Programming Using FutureBasic A beginner's programming course from Ariel Publishing, Inc. c. Learning FutureBasic, Macintosh Basic Power by L. Frank Turovich available from Sentient Fruit also available from STAZ Software, Inc. d. Learning FutureBasic II: The Toolbox by L. Frank Turovich available from Sentient Fruit also available from STAZ Software, Inc. ---------------------------------------------------------------------------- 4. VENDOR ADDRESSES a. STAZ Software, Inc. 3 Leisure Time Drive Diamondhead, MS 39525-3215 USA Phone: (601) 255 7085 (technical help) 800 348 2623 (orders) (601) 255 7086 (fax) b. Ariel Publishing, Inc. 130 Manhattan Square East Wenatchee, WA 98802-8420 USA Phone: (509) 884 9294 Fax: (509) 886 2049 e-mail: * editor@arielpub.com * arielpub1@aol.com c. ...by Design, Inc. 105 Tena Maria Circle Lodi, WI 52555 USA Phone & Fax: (608) 592 7732 d. Sentient Fruit PO Box 270005 Austin, TX 78727-0005 USA ---------------------------------------------------------------------------- 5. FB PROGRAMMING ENVIRONMENT a. What exactly is FutureBasic? FutureBasic is a structured BASIC language development environment for the Apple Macintosh computer. Unlike Zbasic or QuickBasic, which are more "traditional" BASICs in terms of syntax and program development, FutureBasic (hereafter abbreviated as FB from time to time) is a structured language that uses local functions instead of GOSUBs for function definition. These local functions are true functions, in that you can define local variables, pass and return arguments, and eliminate the "spaghetti code" that often defines the structure of a BASIC program. b. Doesn't BASIC suck as a development language? It depends. Before FutureBasic (Macintosh), VIP Basic (Macintosh), QuickBasic (DOS), and VisualBasic (Windows), most BASIC development environments consisted of an unstructured programming model where you built a program loop, printed to the screen, added functions using GOSUBs, and all variables were global. This usually ended up causing major conflicts throughout the program because only the first two characters of variable names were significant, and the resultant code dependancies made the program logic unreadable to even the original programmer. On top of all this was the lackluster performance of the BASIC interpreter, all of which prevented BASIC from being considered as an advanced programming environment. Newer implementations of BASIC now use a structured programming model, where local functions allow a developer to create modular code and prevent the resultant "spaghetti code". FutureBasic, in particular, is a true compiler, not an interpreter, creating assembler code from your BASIC code. Therefore its speed is comparable to code produced by a typical 'C' or Pascal compiler. FutureBasic also includes access to hundreds of Toolbox routines including the following managers and packages: ADB, Color, Color Picker, Control,Deferred Task, Desk, Device, Disk Initialization, Gestalt, Dialog, Event, Apple Events, File, Font, QuickDraw Text, Graphic Devices, Help, List, Memory, Menu, Notification, Palette, QuickDraw, QuickTime, Image Compressor, Resource, Scrap, SCSI, Segment, Shutdown, SOund, Standard File, TextEdit, Vertical Retrace, Toolbox Utilities, and Window managers. Additionally, FutureBasic includes an inline 68000 assembler, access to over 10,000 Toolbox equates, supports recursion, external compiled source code files, and record structures and support. c. Is FutureBasic compatible with Visual Basic for Windows? Well, define compatible. Do you mean can you load in VB code and recompile your custom application right off the bat? Not a chance. Because of the differences in the Macintosh and Windows programming models, you can't do a line-by-line translation of your VB projects. The event loop models are similar, and you may be able to port some of your functions and algorithms, but it'll take some work. Most of the work would involve converting VB event message handlers for the various VB objects (menus, list boxes, text boxes, forms, etc.) into the appropriate event handlers for Macintosh events (menu, mouse, dialog, event, etc.) d. Is FutureBasic compatible with QuickBasic for Macintosh? Again, you need to define your levels of compatibility. A direct statement translation is probably not possible except for all but the simplest of programs. A QB->FB translator is available to do most of the work for you, but you will still need to perform testing and debugging to insure that your old QB programs perform as expected. Also, this would probably be a good time to scrub that old program and rid yourself of old programming habits, like GOTOs, GOSUBs, global variables, and spaghetti code. Take advantage of FB's structured model and improve the performance and polish of your program. Several people who have done so on commercial products have reported a five-fold speed increase, a doubling of program features, and their final application is less than half the size of the older version. e. What major applications have been written in FB? Good question. I can tell you that a lot of shareware has been written in FB. There's even a sprite animation kit out there, for creating the next killer arcade game. But can you get any major software publisher to admit that they're using BASIC for writing commercial quality applications? (The following is paraphrased from a discussion on AOL) "At MacWorld '94 I saw a vendor who was showing off their latest version of {something or other}. I asked what language they used, and the sales rep told me C++. But I knew better, because I was a contract worker on the project and used FutureBasic for all my development work on that project." Here is a list of known commercial and shareware applications written in FutureBasic: commercial: * PG:PRO, PG:Lite -- Staz Software * Classroom Publisher -- Staz Software * Clergycal Publisher -- Staz Software * The Menu Mill * FlashWindows, SIMM, FN Graph, FN Solve -- ...by Design, Inc. * QDFx, CDEF City I & II * C.A.S.E. -- Don Freeman Group, Ltd. * Mac-To-Pick Plus -- Carnation Software * FLTruss, FLBeam -- Sensible Solutions * ShopKeeper Plus -- ShopKeeper Publishing Intl. * Simple S&L -- Surf City Software * Expert Backgammon -- Komodo Software * SimpleBase -- Sentient Fruit * Cliffs StudyWare, by Cliffs Notes, Inc. A range of (Mac) StudyWare products. Some of the older StudyWare products are still in QuickBasic. Sometime in the near future, we hope to eliminate the QuickBasic modules entirely, and have all products done entirely in FB. For more information on these products contact Rick Brown (RickJBrown@aol.com) * Radar Control Training System (ARCT) -- Admiral Training Ltd * Radar Skills Program (ARSP) -- Admiral Training Ltd * Air Traffic Control Aptitude Testing System (ATCATS) -- Admiral Training Ltd These 3 products are in use world-wide with Military and Civil Aircraft Control Training Schools (except in the USA). shareware/freeware/otherware: * Wabbit (A URL sorter and organizer, v1.4.5) -- Mel Patrick (InternetConfig recommended) * BulkRate -- Greg Neagle (see home page info in chapter 2) * MacRoots II * HTML Effects Program (A special effects creator for HTML) -- Tim Howland * RChess (A well-designed chess game, v.2.01) -- Robert Purves * MacDice (Rolls between 1 and 12 die, with varying amounts of sides. Finds averages and has a history feature) -- Erik Lindenius * KeyDown (A little program to display the character, and ASCII, of the key pressed, with the modifiers, v2.0) -- Bob * PegBoard (A little program to display the character, and ASCII, of the key pressed, with the modifiers, v2.0) -- Bob * MultiTask Status (Analyzes multitasking processes, V1.01) -- Nyann Forster * GWorld Revolution (Shows the results of GWorlds) and many others. * MacNanny * Managing Your Money -> Quicken Converter (MYM2WC) * Release It * Loan Pro * Reninance Pro * Soundex (see home page info in chapter 2) * Surge -- Justin Cooke (see home page info in chapter 2) * Tangrams 1.01 (A Tangram making and solving game) -- George Hacker Adams One clue that an app was developed in FB: Snoop around for "ANDY" resources. A search of volume VIII of the Info Mac CD-ROM series (by Pacific Hitech) for the resource "ANDY" by Robert Schenk in april 1996 revealed 34 programs with that resource, some of which have been named above. f. Is a PowerPC version of FB available? Not yet, but it's being worked on. No word on what kind of features will be available, or if you'll be able to compile 68K, PPC only, or fat binary, or anything else. Keep in mind that FB is fully 32-bit compatible with the PowerMacs in 68K emulation, and runs on all System software from 6.0.5 to 7.5. So even if you have a PowerMac, you can still use FB for development, until the native version comes out. g. My Help! compatibility checker says that FutureBasic is not System 7 compatible. I'm using FB version 1.02. What gives? The Help! (by Teknosys) database is incorrect. FB is fully 32-bit clean and compatible all the way up to the Power Macs. h. Where can I get FutureBasic updates? The most recent update which updates FutureBasic II to version 2.1.3 is available on the Internet at several of the websites noted in chapter 2 paragraph b. This updater also updates Program Generator to version 4.1.5. Updaters may also be available on AOL, but I do not get AOL over here, so I need some help getting the information in this FAQ. Updaters are definitely not available on CompuServe, at least I haven't found them there. ---------------------------------------------------------------------------- 6. DEVELOPING APPLICATIONS WITH FB a. What kind of code can I write with it? You can use FB to produce any kind of Macintosh code resource: INITs, control panels, applications, WDEFs, CDEFs, pure code, and even Hypercard XCMDs. Note that I said you can use it produce such code: You still have to learn the Macintosh programming model in order to use FB effectively. FB supports a majority of the Mac toolbox, and as new functions and features are released by Apple in new versions of System software, it's not hard to tell FB how to use these features. STAZ Software, Inc. provides tons of sample code, including interfaces to the serial ports, Quicktime movies, Balloon Help, and low level event handling. However, to do any serious Mac programming, you'd probably do best to pick up a couple volumes of Inside Macintosh, grab the comp.sys.mac.programming newsgroup FAQ, and hang around c.s.m.p. for a while. b. Yeah, but isn't BASIC slow? This was touched on above. FB is compiled, not interpreted. This means that your programs will have the speed of programs compiled in C or Pascal, but without nearly as much programming hassle. FB even has an inline assembler, for those times when you think you know what you're doing and you want to eke out maximum performance. c. How do I convert my QuickBasic programs? FB comes with a QB to FB converter. This is basically a preprocessor that goes through your QB program and puts it into proper FB syntax. However, there are some statements that cannot be directly translated into FB. The QB->FB translator contains a comprehensive "read me" file that outlines the pitfalls of performing the conversion. d. Where can I find code to do First, have you tried to write it yourself? Although a lot of programmers release a lot of code for different functions, it's kinda unfair to troll for source code when you haven't even bothered trying to do it yourself. That said, I'll assume you have pounded your head against the wall trying to understand 'Inside Macintosh' and converting the reams of available Pascal and C source into FB syntax. There are four great places to find FB example code; the FB Functions Library Help file, the AOL forum "Ariel", Compuserve in MACDEV forum or on the Internet at http://www.ids.net/~paumic/FutureBasic/. New places are emerging regularly and they will be mentioned in this FAQ, if known to me. The first place to find example code is under the Help menu in FB itself. A lot of the examples contained in the Handbook and Reference manuals can be found here. Look around for the type of function you need, whether it be a QuickTime movie, dialog source, or an application shell. Remember, the nice thing differentiating FB from other BASIC dialects is the modularity of the code; you can usually drop a well written LOCAL FN right in without any conflicts. If you subscribe to AOL, use the keyword "Ariel" to access plenty of FB code. In the Ariel forum, go look under "Useful FB Routines" for a similar array of samples. Again, find something similar to you needs, grab it, then hack it until it works. e. Are there any add-ons for FutureBasic? The best add-on you could get for FutureBasic is the Program Generator, from Staz Software. It comes bundled with FutureBasic. PG is a program generator/interface builder for FB. It lets you draw windows, buttons, dialogs, edit fields, etc., and then generates the correct FB code for you. For technical support on AOL for the Program Generator, try in the Ariel forum (keyword: Ariel). You can also try sending e-mail to tech@stazsoftware.com or STAZology. Not really an add-on, but probably just as essential, might have been a subscription to "Inside Basic", before it unfortunately ceased publication. IB was a monthly magazine that contained all sorts of tips and tricks not just for FB, but for a whole slew of BASIC syntaxes. IB was available on paper, disk, both, or via the Internet for about $50. A complete set of all issues plus a lot of extra's will be available on CD-ROM. Contact Ariel Publishing, Inc. for more info. Additional add-ons are available from ...by Design, Inc. and includes FlashWindows, an interface generator, SIMM, a spreadsheet and grid generator, FN Graph for 2-D graphing ability, and Fn Solve for solving algebraic equations. Contact ...by Design for additional info. Training is available through "Learning FutureBasic: Macintosh BASIC Power, a 352 page book that walks you through the creation of a complete employee database, from conception to final application. While creating the program it explains the why of windows, events, menus, buttons, edit fields, printing, resources, and more, plus it shows you how with step-by-step examples. A second book "Learning FutureBasic II: The Toolbox" has just been released. Contact Sentient Fruit at turovich@aol.com for additional info or just download the SimpleBase example on AOL or Compuserve. ---------------------------------------------------------------------------- 7. REAL FB FAQs a. When I run my program with the debugger ON (go/hide) it takes 9 seconds to complete. Running it with the debugger OFF, it takes over 5 hours to complete! Any ideas? I had something like that happen once. Do a _complete_ rebuild with the debugger OFF. I had some .INCL's with the debugger code still in the generated code (don't ask me how). With the generated debugger code in the include files and the debugger actually off during the final build, things get very, very kinky in a hurry. The only way to clean it all up is a fresh reboot, a fresh start of FB II, make sure the debugger is off, select compile all, and rebuild. In short: * Trash your project file (pi). * Do a complete regenerate of all resources in PGPro. * Run FB from a fresh boot. * Force a compile all of all files in FB. b. Where can I find more answers? The STAZ Software Website has a page containing FAQs about FutureBasic and Program Generator. Current topics that are discussed there are: * How do I debug segments greater than 32K? * I miss the old constants tool. How can I get it back? * How do I install MacsBug? The Web Site also contains software updates, technical info, programming routines and other interesting stuff. ---------------------------------------------------------------------------- OK, you've gotten to the end of this FAQ. What didn't get covered? Do you have any FB tips or tricks to contribute? Send them to my email address listed at the top of this article. I'll plan on updating this FAQ regularly. Thanks for your support and interest. Floris van Sandwijk sandwijk@tref.nl