Details
Date 2006-06-11
Version 0.16 Beta
Summary The parser will now recover from non-fatal errors, full support for namespaces, all compound statements now open implicit scope blocks, besides many bug fixes.

See the changelog for more details.
Changelog [changed]
  • IMPORTANT: the NOT unary operator behavior in conditional statements is now fully compatible with QB/VB (ie: always bitwise, never logical), see the migrating.txt file for more details
  • IMPORTANT: every compound statement (IF, FOR, etc) will now open a new scope block, see the migrating.txt file
  • any non-SHARED, COMMON or EXTERN variable and array declared in the module-level (ie, outside any function) will be allocated on stack now (that was changed to allow non-constant expressions to be used with variable initializers in the module-level), to declare static symbols, see the next item
  • STATIC can now be used in the module-level too
  • local arrays with unknown dimensions (ie: DIM array()) can now be declared inside functions too
  • floating-point literal numbers in scientific notation without an integer and fractional part cannot be written as ".E###" anymore, they must be changed to "0.E###" due ambiguities with macro substituions and .'s been used in WITH and (later) to access objects' member fields
  • internal symbols mangling, if using DLL's that contain exported variables or overloaded functions and that were compiled by older versions, rebuilt the DLL's also
  • when aborting because run-time errors, the name of the module that caused the error will be printed too
  • runtime error checking removed from getmouse() and getjoystick()
  • the size of argument-less #defines and macro expansion texts can be now up to 2GB
  • parentheses ()'s aren't anymore optional with arg-less macros, to allow them to be passed as parameters to other macros
  • GOSUB and ON expr GOSUB cannot be used inside SUB's/FUNCTION's anymore (GOTO will be always allowed), RETURN without expression can now be used as a shortcut to EXIT SUB|FUNCTION
  • UDT parameters (TYPE's) can now be optional too
  • any complex expression can be used in optional parameters, not constants only
  • duplicated definitions of type aliases with exactly the same target types are now allowed
  • the OpenGL extensions header was replaced by a machine translated one
  • UDT's (TYPE's and UNION's) can have the same name as keywords
  • Dir()'s "attribute" parameter by default shouldn't include directories, hidden or system files
  • INPUT will now accept floating-point numbers loaded to integer types, rounding them as in QB
  • maximum number of array dimensions changed to 8 to speed up allocation of arrays with unknown dimensions
  • more restrict pointer resolution in overloaded functions
  • the Allegro headers were replaced by machine translated ones, END_OF_MAIN() must be used now in Linux
  • bad compound statements are better handled now, new-lines won't be ignored anymore neither multiple error messages will be shown
  • for CONST's with explicit types, no inference will be done, the r-side values will be converted instead
  • the GLFW include file was retranslated using the latest C header
  • PRINT in Linux won't convert characters over 127 to UTF-8, allowing UTF-8 string to be printed too
[added]
  • name spaces blocks (NAMESPACE ID ... END NAMESPACE), that can be nested, imported, etc
  • extern blocks (EXTERN "MANGLING_SPEC" LIB "LIB_NAME" ... END EXTERN), to better support libraries written in different languages than BASIC or C (C++ for example)
  • anonymous UDT's that can be passed as parameters or used in assignments, like: "foo TYPE(1,2)" where foo was declared as "foo([mode] p as bar)"
  • TYPE(...) to allow anonymous UDT's to be passed to overloaded functions
  • non-fatal error handling, the parser won't exit unless #-errors happened, making it easier to port sources from different languages to FB and to work with large projects
  • the -maxerr command-line option, to define after how many errors the parser should stop
  • the "= any" variable initializer, that tells the compiler to not clear the local symbol
  • support for the optional "digits" argument in HEX(), OCT() and BIN() (and their wide-char versions)
  • the -include command-line option, to pre-include headers in every source file (.bas) that will be compiled
  • Linux framebuffer console gfx driver (lillo)
  • warning message when allocating implicitly a variable inside an expression
  • DRAW STRING statement, to draw text in gfx mode at pixel perfect positions; supports default as well as custom fonts
  • the curses.bi header compatible with ncurses
  • over 30 Gtk tutorials translated from C by Claudio Tinivella
  • AVI-capture missing symbols to the vfw.bi Windows API header
  • new prototypes to the Newton header
  • better duplicated definition check when implicitly allocating variables whose names contain periods, inside functions that return UDT's
  • libPNG import library and include file
  • libJPEG import library and include file
  • gif_lib import library and include file
  • ImageConvertRow, to convert between different color depths
  • import library and include file for the Curl library
  • an optional out_attrib parameter to Dir(), that returns the attributes of the file matched
  • the __FB_OPTION_EXPLICIT__, __FB_OPTION_ESCAPE__, __FB_OPTION_DYNAMIC__, __FB_OPTION_PRIVATE__, __FB_OPTION_BYVAL__ defines, that are set to TRUE (-1) if the respective OPTION was used, FALSE (0) otherwise
  • DirectPlay headers from the DirectX SDK
  • DirectMusic headers from the DirectX SDK
  • DirectShow headers from the DirectX SDK
  • the ZSTRING and WSTRING types without PTR's can now be used in TYPE aliases
  • the $ prefix for literal strings, to not process escape sequencies when Option Escape is been used
  • literal strings can be concatenated just by grouping them, without using + or &
  • EXIT SELECT, to exit CASE blocks without resorting to GOTO's
  • the __FB_OUT_EXE__, __FB_OUT_DLL__, __FB_OUT_LIB__, __FB_OUT_OBJ__ defines, that are set to TRUE (-1) depending on the output format (Executable, Shared library, Static library or Object file) select when compiling
  • overloaded unsigned versions (ubyte, ushort, uinteger and ulongint) of INPUT
  • CONST AS SymbolType foo, bar, ...
  • ENUM's can now be used in explicitly typed CONST's
  • ENUM elements can now be referenced as: enumid.elmentid
  • spidermonkey (a JavaScript embedded interpreter) headers and import library
  • multi-line comments: /' this is a comment '/
  • the erfn and ermn to retrieve respectively the function and module name when a runtime error occur
[fixed]
  • INPUT from console when it's been redirected
  • "any ptr"'s weren't been taken as "byte ptr"'s when pointer arithmetics were used
  • using the -exx option with too complex expressions in src files with too many functions would generate bad code
  • PUT ALPHA had a problem with sprites having an odd width
  • if the size of the destine string was unknown when assigning an ASCII to a WSTRING string, nothing would be copied
  • bitfields couldn't be used in SELECT CASE
  • address of null pointers couldn't be taken if sources were compiled with null-pointer checking on (-exx)
  • SETDATE string to integer conversion was incorrect, making it always fail
  • the default type in PEEK and POKE should be unsigned byte, not signed
  • shifting 64-bit integer operands by constants above 32 were generating wrong code
  • doing integer-only operations like \ mixing 64-bit integers and floating-point operands would generate bad code
  • suffixes (%, #, etc) were not been preserved in argument-less #defines
  • NOT couldn't be used in pre-processor directives if ()'s were present
  • w- and z-strings were been allowed in IIF()
  • GFX PUT's CUSTOM callback couldn't be a pointer
  • INPUT in Win32 was not printing the message to console
  • resource files were not been passed inside quotes to GoRC
  • __FILE__ couldn't be used in anything but Linux if it had a path and OPTION ESCAPE was on due the \'s
  • anonymous UDT's (TYPE(...)) couldn't be used when setting function results
  • assignment of different UDT types were been allowed
  • power-of-2 MOD to AND optimizations can't be done in signed types without checks at runtime
  • field dereference couldn't be used with CAST( ... ptr, ... )
  • INPUT$(n) was crashing when reading from console
  • PAINT was crashing if using a buffer as target with a height bigger than the screen mode used
  • debugging UDT fields wasn't been possible, all offsets were passed as 0 to GDB
  • spilling byte registers would cause wrong code to be emitted in some cases
  • profiling functions were been called inside destructors
  • another PRINT USING fixes
  • LINE INPUT # had a memory leak
  • precision when converting doubles to strings was one digit too low causing problem with 64-bit int consts assigned to floats
  • default drawing scale for DRAW statement is now as in QB 4.5; also fixed relative M command parsing
  • calling void function pointers in expressions was been allowed
  • passing GFX_NO_SWITCH to SCREEN resulted in a program freeze when using the DirectX gfx driver
  • styled box drawing was mistakenly not implemented
  • DRAW and WINDOWTITLE crashed the application if called with an empty string variable
  • specifying a border color to VIEW in gfx mode had no effect
  • MID statement (not the function) for wide-strings was not passing the size of the destine string
  • wide-string indexing was not multiplying the index expression by sizeof( wchar )
  • bitfields declared inside unions had wrong offsets
  • INKEY did not report extended ascii characters under Linux X11 gfx mode
  • overflow could happen if assigning an asc string to a too small fixed-len wide string
  • PAINT crashed when used against target buffers smaller than the screen
  • FORMAT: infinite loop when rounding; too big (over 2^63) or too small numbers weren't converted correctly
  • PRINTing wide-strings in Linux with characters above 127 was given incorrect results
  • text-mode's (SCREEN 0) width wasn't been restored when SCREEN was previously in a GFX mode, causing problems with PRINT
  • the number of arguments passed to macros wasn't been checked
  • enum's were not been allowed in CAST( DataType PTR, ... )
  • external libraries were not been passed to LD when linking shared libraries in Linux
  • "end if" was missing in ASSERT and ASSERTWARN, they couldn't be used before statement separators :'s
  • converting unsigned constants to strings at compile-time was returning the numbers in signed form
  • type aliases to themselves were case sensitive, causing forward symbols to be created if cases were different
  • descriptors of local dynamic arrays with unknown dimensions weren't been reseted
  • non-pointer arguments were been coerced when passed to pointer parameters
  • changing string constants was been allowed
  • WRITE was outputing floating-point numbers around quotes
  • non-decimal 64-bit literal constants were been sign-extended from 32-bit if below 2^32
  • bit-fields accessed inside private functions would cause errors
  • the level of indirection of UDT params was not been take into account when creating mangled names for function pointers
  • stack was been wrongly poped in some cases of DIV and MOD of integers
  • resolution of overloaded function pointer arguments were not working
  • byte and short var-args were not been converted to integers




Copyright © 2004-2008 The FreeBASIC development team.