Details
Date 2005-07-23
Version 0.14 Beta
Summary Many improvements such as full debugging support, function overloading and pointer type-casting.

See the changelog for more details.
Changelog [changed]
  • IMPORTANT: to fully support pointer type-casting, now every time a pointer is updated, the expression will be multiplied by the pointer type, as done in C, so if you had: "dim p as integer ptr:" "p += len( integer )", now it must be changed to "p += 1"
  • to make BYVAL AS STRING arguments more safe, as they are allowed in FB functions since version 0.13, if not passing pointers or numeric values such as NULL or 0, the BYVAL modifier will have to be used now
  • _main will be always the entry-point from now, to be more compatible with statically linked C libraries and to remove the DOS and Xbox temporary object creation "hack". Because of that, if compiling and not linking objects files, the -m command-line option must be used to tell the compiler which module will be the main one
  • the DllMain function is not needed anymore in the Windows version, just declare the exports and remove the DllMain function, it won't be ever called
  • the module-level code of non-main modules will now be always executed (before the main module), no REDIM's or such will be missed as it used to happen in QB. Implicit module initialization can be done now as in Pascal, just add any code to the module-level scope (ie: outside any function)
  • the array descriptors had to be modified, if you have any DLL's compiled with old versions, please recompile them with this new version if passing arrays by descriptor to functions
  • the intrinsic functions SIN, COS, TAN, ATN, SQR, INT and ATAN2 are now implemented as inline and will be evaluated at compile-time when constants are used as parameters
  • macro text will be expanded on comments emited when the -g command-line option is used
  • multiple strings concatenation such as "a = b + c + d + ..." will be converted to "a = b: a += c: a += d: ...", giving a speed up, because no temporary dynamic strings will be used
  • speeded up PUT routine when using PSET/PRESET/AND/OR/XOR drawing mode
  • the compiler is now a bit easier to be cross-compiled using the Win32 version
  • SCREENINFO does not return a pointer to an internal structure anymore, and if called before a gfx mode has been set, it returns infos on the desktop resolution/depth. See gfxlib.txt for more info
  • COLOR will now return the current/last color attributes as: (forecolor or (backcolor shl 16))
  • WIDTH will now return the current/last dimensions as: (width or (height shl 16))
  • LOCATE will now return the current/last cursor state as: (x or (y shl 8) or (visible shl 16))
  • ENUM's are now much more restrict, warnings will be shown if they are passed or assigned to other types than integers, but now it's possible to overload functions where the enum argument is the main one
  • curdir$ now returns path with backslashes instead of slashes (mjs)
  • OPTION's will now be used too in the context of the file that included a header if it changed the default OPTION's
  • chr$(0) can now be output with PRINT too (mjs)
  • Printing PAD's now works exactly the same as on QB(X) with console/file/redirected console
  • MULTIKEY, GETMOUSE and SETMOUSE will now also work in plain console text mode
  • user defined type (UDT) assignaments are now done with inline code
  • the Windows version of FBC can now compile and link DOS, Linux and Xbox applications if the proper cross-compiling versions of the GNU binutils are available and if all the libraries needed are installed
  • #UNDEF will now work with any symbol kind, not defines only
[added]
  • function overloading, the return type is not taken into account, only the arguments (as in Java)
  • pointer type-casting: CPTR( DataType, Expression ), as in: "*cptr(byte ptr, somePointer) = 255"
  • functions can now return structures (user defined types) too, only external functions could before
  • full debug support using GDB (the GNU debugger) or Insight (GDB's GUI frontent), only dynamic arrays can't be watched at the moment, everything else works, including var-len strings and UDT's
  • array bounds checking when the -exx (extra error checking) cmd-line option is used
  • null pointers checking, same as for array bounds checking
  • alpha blending support for PUT; pass ALPHA as drawing mode. Only works if in 32bit color depth
  • uniform alpha blending support for PUT: pass ALPHA,value to specify an unique alpha with which to blend sprite with background. Works in 15, 16, 24 and 32bit color depth
  • custom blenders for PUT: pass mode CUSTOM,blender, where blender is a pointer to a function of the form "function blender ( byval src as uinteger, byval dest as uinteger ) as uinteger". This will be called for each pixel and must return the new blended pixel to be drawn
  • RGBA() built-in macro, works like RGB() but allows to specify an alpha value
  • CVSHORT(), CVLONGINT(), MKSHORT$() and MKLONGINT$()
  • byte, short and longint overloaded versions of HEX$, OCT$ and BIN$
  • GETJOYSTICK function in gfxlib to get the full state of an attached joystick
  • FUNCTION can now be used inside inline assembly blocks to set the function's result
  • error message when macro text is too long
  • support for 16 background colors if in text mode under Xterm in Linux
  • added BMP saving capabilities to BSAVE, due to popular demand
  • warning message for suspicious pointer assignaments
  • include file and import lib for the CGUI library
  • many NeHe OpenGL lessons, ported by sisophon2001
  • IMAGECREATE and IMAGEDESTROY built-in function to create and destroy gfx image buffers
  • PALETTE [USING] now supports the new PALETTE GET [USING] construct to get current palette color(s), so you can do "PALETTE GET index, r, g, b" or "PALETTE GET USING pal" instead of using the old INP/OUT tricks
  • added SCREENSYNC to wait for vertical blank, so you can use it instead of the old WAIT &h3DA,8 trick
  • added SCREENLIST to fetch available screen modes
  • added DYLIBFREE to unload a dynamic link library previously loaded at runtime by DYLIBLOAD
  • labels already defined can now be referenced in inline ASM
  • #DEFINE macros can now be empty too, as the argument-less ones used to
  • '##'s can be used now to delimit macro arguments as in C: #define makefuncname(name) func_##name##
  • the '#' prefix can now be used in macros when the text representation of a macro argument is wanted
  • ASSERT built-in macro, works like in C (it's only enabled when the module is compiled with debugging support (-g))
  • Allow to compile the "linux" version with CYGWIN (non-functional yet)
  • signals and some exceptions like seg. violation and div by 0 can now be handled by users in standard ON ERROR handlers if compiling with error checking on (using the -e or -ex cmd-line options)
  • version macros __FB_VER_MAJOR__, __FB_VER_MINOR__, __FB_VER_PATCH__, __FB_MIN_VERSION__
  • graphical PUT will now fail and report a runtime error if an image GETed while in a mode with a certain depth is attempted to be drawn in a mode with a different color depth
  • private functions will only be emitted if referenced
  • constructor and destructor functions -- constructors will be executed *after* fb_Init
  • -map to create a map file
  • the ERL function -- returns the line number where the runtime error happened, as in QB
  • include file and import library for GMP (multi-precision lib)
  • include file and import library for FastCGI
  • the OFFSETOF macro, to return the offset of an UDT field: ofs = offsetof(myudt, somefield)
[fixed]
  • EQV can't be optimized when used in compound stmts, because the NOT opcode doesn't update any flags on x86
  • INPUT$() for console was reading a char less, causing INPUT$(1) to fail
  • PRINT USING ^^ should be used to set the number of exponent digits
  • more thread-safetiness checks in platform dependent rtlib routines
  • SHELL in Linux was not restoring console state before calling sub-process, resulting in bad keyboard I/O
  • @'s used on DATA stmts were storing the names, not the addresses of var's or proc's
  • DRAW had a parsing problem when directed towards an offscreen GET/PUT buffer
  • parameters passed explicitly using BYVAL weren't been checked with byval string arguments
  • PUT was accepting literal values, what will fail because the way BYREF AS ANY args pass numeric values
  • complex pointer expressions would not be parsed if used as parameters to functions
  • SWAP wasn't working with type fields
  • Mouse wheel position was reset to 0 under Win32 when window was put out of focus
  • non-numeric variables were been allowed in CHR$()
  • the unary operator "+" was been allowed with string operands
  • intrinsic string functions when used with "zstring *" arguments would operate on the full strings, not only until the null-terminators
  • ENUM elements separated by commas would update the values twice
  • Text mode colors now behave correctly under Eterm in Linux
  • PRINT'ing nothing followed by commas "PRINT," would not print the padding correctly
  • escape sequences were not being converted when used within var initializers
  • MMX inline asm wasn't compiling as GAS didn't understand it even if .arch i686 was used
  • WIDTH in gfx mode was crashing if either one of width or height was not specified
  • STEP clause applied to PSET was not forcing coordinates to be relative to last gfx cursor position
  • function profiler rewritten to fix recursive functions profiling
  • swapping fixed-len and z-strings would not swap or set the null-terminators
  • wrong code could be generated when 64-bit integers (longint's) were used in complex expressions
  • field arrays of UDT's are now padded to follow the GCC 3.x ABI
  • using gfx primitives inside a screenlock/screenunlock pair will not hang programs anymore
  • BLOADing a 2 or 16 colors BMP was giving screwed images
  • ON expr GOSUB would crash because the jump-table was not skipped as with GOTO
  • strptr(lit string) when used to initialize static or module-level variables would generate an exception
  • byval string params were not passed correctly to byref as any arguments when the byval clause was used
  • wrong number of dimensions in a static array would generate an exception
  • LINE INPUT was allowing any data type as argument, not strings only
  • VIEW in gfx mode was not filling the area if a fill color was specified, and border color had problems if in truecolor mode
  • using CLS in Linux console was forcing screen clear on program exit
  • passing by desc arguments to GFX function w/o explicit indexes given would crash the compiler
  • dereference of void types was been allowed
  • a field referencing the parent UDT would put the compiler into an infinite loop
  • ASM inline in the RT lib would not generate what was expected in GCC 4.x, as it's more restrict than 3.x
  • EOF didn't work with INPUT files on DOS (DJGPP, GCC 4.0)
  • The _get_cs(), _get_ds(), _get_ss() implementations didn't work
  • curdir$ didn't work for DOS and might have caused SIGSEGV on Linux
  • the ANY type was been allowed in DIM/REDIM
  • redimension of array fields was not resulting in a compile-time error
  • include files are now searched for in current dir, then the source file dir, then the system include dirs
  • chr$(0) will not be evaluated at compile-time, to circumvent the null-terminator limitation with strings
  • MID$()= (assigning MID) didn't release temporary strings (1x src and 3x dst)
  • Win32 OpenGL driver had problems with fullscreen modes on some machines
  • made all Win32 gfx drivers more vsync friendly
  • now using SetDIBitsToDevice instead of StretchDIBits in GDI gfx driver, solving some drawing problems
  • the 8bit TRANS mode MMX PUT routine produced wrong results
  • PRESET did not behave as it was supposed to
  • overloaded functions could not use the function name to assign results
  • local undefined labels were silently ignored
  • BLOADing a BMP with 16 or less colors was changing the whole 256 colors palette if in 8bit mode
  • __LINE__ now returns a number instead of a string
  • VIEW cleared the screen with a bad color if called without arguments, instead of just resetting the view
  • coordinates translation with PMAP was giving back bad results
  • thread-safetiness fixes to DIR$
  • "#define foo bar" now works too, where "bar" is a macro




Copyright © 2004-2008 The FreeBASIC development team.