|
QUICK ACCESS KNOWN FB^3 LIMITATIONS FB^3 - CLEANING AFTER CRASHING... SPEED OPTIMISATION QUERIES STOLEN SECRET WISHLIST FEATURES HIDDEN FEATURES [return to FAQs page] [next FAQsheet] [previous FAQsheet]
Last Updated
Jan. 21st, 2000 |
FAQsheet #5 :: HIGH-LEVEL STUFF KNOWN FB^3 LIMITATIONS Toolbox Calls and Functions can handle any number of passed parameters. Local Functions ( LOCAL FN) do not have a limit in the number of passed parameters, but after the 8th parameter, you may not pass a complex expression (like "a$ + MID$(b$,10)". If you do try to do this the compiler should give you a warning.[Q]: I haven't seen any minimum specification for FB^3, does such info exist? [A]: Yes. System 7.6 [Q]: Are spaces before colons necessary? [A]: Unfortunately - unless this changed in a last minute beta... A line like: BEEP:BEEP*could* be mistaken by the compiler as a QuickBasic label. Change it to: BEEP : BEEPand the compiler should stop complaining. It's called "QuickBasic Labels", and is documented in the "FB^3 Editor" manual. Turn off that option in your preferences, and your program will work fine. Right now, it's treating everything _before_ the colon as a label, not executing it (thus no CLS in CLS:PRINT:PRINT) and you have two lines somewhere that start with BEEP:, so the second is a "duplicate line label".Alternatively, you can insert spaces before all the colons - but turning the pref off is quicker. [Q]: In my source code, There are many 'CLEAR LOCAL FN' lines. According to the Reference, it's the same as:CLEAR LOCALand No errors appear in compiling time. But the functions don't appear in FN menu. Is this a bug?[A]: The FN menu does not find a function that starts with CLEAR LOCAL FN. It looks for <CR> LOCAL FN.[Q]:? [A]: These statements will _not_ work in FB^3 release 0 when you are trying to work with anything other than the active window. (In other words -- don't try it with a background window or an invisible window) EDIT FIELDWe will try to have this normalised in release 1. [Q]: In FBII .. The first 15 chars of an FN's name had to be unique as FB only checked the first 15 chars and disregarded the rest of the name. The same with constants' names... Does this hold true in FB^3 [A]: No. There are several things to consider, but you can get a function name up to about 240 characters. [Q]: Why can't I generate PPC assembly on a 68K Mac, even though I can generate a PPC app on a 68K Mac? [A]: This version of the FB3 assembler is limited to the cpu it is generating code for... You can't use 68K assembly language while compiling PPC and vice-versa. [Q]: Comparisons between unsigned longs don't work correctly when the most-significant bit is set in one of them. See example below: '-------------------[A]: In this version: + & - work but >,<,=,*,/ etc. do not work on unsigned longs... if one of the longs is negative. |
|
[return to top] |
FB^3 - CLEANING AFTER CRASHING... [Q]: What is the equivalent to replacing the Staz Extra File? [This was needed in FBII after a heavy crash - ] [A]: I'd throw away the STAZ folder inside of the preferences folder. Everything else is placed on the disk by the programmer. you can also try the entire FB Extras folder. But... FB does not run in the same application heap as the created program. Nor does it ever run interactively. The chances of damaging the compiler or editor (or even your project resource file) are greatly decreased. [Q]: Is the advice of chucking the project file still valid? or could it have dire consequences? [A]: It is no long valid. The project file is no longer automatically created. It would be a lot of work to manually recreate it. [Q]: After a crash (my fault!), the Editor window won't zoom back to the previous size! [A]: You *could* remove the 'wpos' resource from the file [not for the light-hearted]. But it's easier to throw away the prefs file (path System Folder:Preferences Folder:Staz:Editor Prefs.) Or you can hold down the option key at start up and the default prefs will be reset.[Q]: OK, I Duplicated the Project File as a Back up .. And removed its 'wpos'. Then I opened it. It landed about half open near the middle of the screenI resized and repositioned it .. Quit & checked its resources. It had replaced the 'wpos' resource with the correct position (I assume this as when I opened it after a 'Quit', it was over on the right at the right size just like I had repositioned it)Then I checked the file that I had removed the 'wpos' from: the 'wpos' was still missing .. It had not had the 'wpos' replaced where the Project Manager had .. Is this significant?[A]: You have to move the window before the 'wpos' gets saved. Try that and check again.[Q]: If you're having serious problems with a project; create a new one with Blank files. Transfer text by hand from old projects to the new ones. Save the New Project. trash the old one. It's probably long like this but at least you don't pass along corrupt resources. [A]: Thank you. |
|
[return to top] |
SPEED OPTIMISATION QUERIES [Q]: The variable alignment doesn't have any positive affect. When testing the speed difference between having the feature turned on and turned off, I lose a second (just one) when the feature is turned on. [A]: Your vars often fall on even boundaries anyway. The pref can only affect speed if it happens to place an often used (millions of times) variable on an even boundary when it would not normally be placed in a register. [Q]: [Concerning unpredictable results in speed tests, with the same test example executing at different speeds depending on the memory location]. We found that the 16/8/4 byte boundaries [alignments] have nothing to do with the speed [of execution of test loops]. (This was a surprise.) It seems to be affected more by the internal instruction cache of the processor than anything and this has so far been unpredictable for us. [A]: Extract from the Motorola MPC750 (i.e. what Apple calls G3) technical notes: Performance features such as the branch folding, removal of fall-through branch instructions, BTIC, dynamic branch prediction (implemented in the BHT), two-level branch prediction, and the implementation of nonblocking caches minimize the penalties associated with flow control operations on the MPC750. The timing for branch instruction execution is determined by many factors including the following: Whether the branch is taken Whether instructions in the target stream, typically the first two instructions in the target stream, are in the branch target instruction cache (BTIC) Whether the target instruction stream is in the on-chip cache Whether the branch is predicted Whether the prediction is correct No mention of code location in memory as affecting speed. This looks like a problem for Higher Authority, probably Apple in the first instance. |
|
[return to top] |
STOLEN SECRET WISHLIST FEATURES Please note: This list reflects only the information that the has managed to assemble from various secret sources. In no way does it reflect any strategies, promises, guarantees, IOUs nor anything at all from StazSoftware, nor from any person remotely associated with Staz Software. [Q]: I like the way the input window works in the lite runtime, but can it be made moveable? It hides part of the output window, but can't be moved out of the way even though it has a title bar. [A]: That would require an additional dialog proc routine in the Lite runtime. I'll put it on the list. [Q]: One of my biggest problems (my fault) is that I forget to quit my darned test App and have to first quit FutureBASIC then quit it. I think maybe an option that allows FutureBASIC to tell the App to quit if someone goes back to the editor would be useful. [A]: Our feature list is frozen now. (No exceptions!) But I have put it on the list for another release. [Q]: I want to be able dump a shared library onto a project window. The current TOOLBOX and LIBRARY calls would work for accessing a given shared lib in a FutureBASIC^3 project. [...] or 'hard link' to the shared lib. The compiled code of the shared lib will then be merged right into the program at compile time. The reason for this is so that the end user does not need the shared library installed. All kinds of these jump to mind, such as ZLib, ZOOP, WASTE, etc. Nobody out there has those in their system folders. [A]: OK. It's on the list. [Q]: But didn't Staz or Andy say something about 68K code resource creation being ready in FB^3. [A]: We're close, but it won't be out in the first release. [Q]: I would like to mention that the PowerPC inline assembler is a little weak on some points. All the opcodes assemble okay so far, but its missing some of the most common simplified mnemonics, especially for branching opcodes. I really miss the bne, blt, bgt, li, etc.The 68k assembler on the other hand is pretty awesome! Can finally access global variables and jump around FB statements and the labels are interchangeable! Yeehaw. With the simplified mnemonics the powerpc assembler would be a major asset to language as a whole. Personally I can wait on that since PowerPC assembly still works, although it can be unwieldy since I have to refer to the manuals often for the expanded syntax needed in many opcodes. [A]: ... [Q]: When will you be introducing variables into the debugger? [A]: Don't know. Not this release. Probably the next one. [Q]: I am constantly changing prefs when I switch between projects. Perhaps each project could always use it's own prefs. These could be accessed through a Project Prefs dialog. The current compiler prefs in the tabbed prefs dialog could set the Defaults for new projects. [A]: This is on the list, but will not be attempted before release 2. [Q]: Could you (euphemistically speaking) add a favourites menu (like ResEdit) or a Recent Project menu item so that when you use the editor you can choose from a menu the project you would like to open. Maybe keep the last five projects or documents on a hierarchical for convenience. If this is added, could we add a way to flush them from the menu. [A]: Good idea. I'll put it on the list. [Q]: OK, while I'm on a winning streak... A string constant, _stringConstant$ = "this is a string constant". Just like numeric constants they aren't changeable. Cuts down on globals...[A]: This is what FB^3 actually does in the background, but we have not brought the syntax into use that would allow you to use it. It's on the list.[OK Summer here's your bone now, nice doggy... :-) ] |
|
[return to top] |
HIDDEN FEATURES Undocumented feature #1, contributed by Andy Gariepy himself: PROGRAM 1 - disables any dimmed vars from becoming registers.PROGRAM 0 - enables DIM'ed vars to be register vars.Undocumented feature #2, contributed by Staz: FB^3 supports 115K and 230K baud from the comm port. You can also address 8 ports instead of two. The following example shows how many ports are in use and what their names are. window 1Undocumented feature #3, by Andy, documented by Staz:Andy says that the option-space and option-minus is a common error in programming because you can't tell (by looking) that you hit the wrong key. I will modify the next editor so that (if you are using a roman script system) option spaces are automatically converted to spaces and option-minus signs (really an en-dash) are automatically switched to a minus sign when you select Strip Spaces from the Edit Menu. Undocumented feature #4: Hold down the option key at start up and the default prefs for the Editor will be reset. Undocumented feature #5: Andy has added a new feature. As you know, FB^3 can contain multiple resource files. Currently, if the same resource ID exists in two files, the second one replaces the first one. A new feature automatically renumbers resources in the range of 32512-32767. Since the ID may have changed because of a conflict, you will need to access these resources with FN GETNAMEDRESOURCE("the name",_Type"). Resource IDs not in this range will be left alone.Undocumented feature #6: Right now, the editor scans the header folder to locate any file that is an FB^3 text file with a name that begins with "RnTm" and ends with ".Incl". This means that anyone can add their own runtimes to the folder just by using the correct name. This is a very cool undocumented feature. Just for the heck of it, I made a dummy file called "Rntm PalmPilot.Incl" and dropped into the "Headers" folder. It showed up in the "Project" menu right with the others. Choosing it made me a nice "Palm Pilot" project - alas, no runtime code. (This begs the question. Since the Palm runs on a Motorala 68k processor and FB^3 compiles 68k code, if the appropriate Runtime were available, I'm assuming FB^3 could generate Palm Pilot applications. Correct?) Undocumented feature #7 [Q]: I notice in the Reference Manual that END now releases all resources. Does this mean that we no longer have to worry about releasing individual resources (even non-purgeable ones) as long as the END statement is the last one executed?[A]: Yes. |
|
FutureBASIC is a registered trademark of Staz Software, Inc and is used with permission. |
||