Search found 46 matches

by BasicJan
Aug 03, 2008 20:14
Forum: General
Topic: QB-compatibility: ON ERROR GOTO <label>
Replies: 2
Views: 1697

In addition a short test program:

Code: Select all

DEFINT A-Z
DEFINT a-z

DECLARE SUB TestErrorTrap ()

SUB TestErrorTrap()
  ON ERROR GOTO FileErrorTrap

END SUB

FileErrorTrap:
  SystemError=ERR
  RESUME NEXT


Moving the FileErrorTrap to the SUB results in a correct compilation.
by BasicJan
Aug 03, 2008 15:51
Forum: General
Topic: QB-compatibility: ON ERROR GOTO <label>
Replies: 2
Views: 1697

QB-compatibility: ON ERROR GOTO <label>

QuickBasic requires the error handler (preceded by the label) to be OUTside the SUB or FUNCTION where the ON ERROR GOTO-statement is located. FreeBasic requires the error handler to be INside the SUB or FUNCTION where the ON ERROR GOTO-statement is located. If the error handler is placed OUTside the...
by BasicJan
Aug 03, 2008 15:24
Forum: Windows
Topic: Unexpected ASM-warning while compiling
Replies: 1
Views: 1304

Unexpected ASM-warning while compiling

While compiling next code, a warning is generated while compiling the program: FILE: BIBLIOTH.BAS ' $DYNAMIC Set arrays dynamic for better use of memory DEFINT A-Z DEFINT a-z DECLARE FUNCTION CalculateDateNumber(CDate$) AS LONG FUNCTION CalculateDateNumber(CDate$) AS LONG 'Calculate ...
by BasicJan
Jan 18, 2008 12:41
Forum: Tips and Tricks
Topic: DEF SEG + PEEK/POKE hack
Replies: 19
Views: 6827

Request for VAR SEG at -qb

I would like to be the first to ask for the VAR SEG-addition at the -qb version of FreeBasic. I still have problems to compile my QBasic-programs without modifying the source. Other unsolved un-compatibilities are: = lachk of CURRENCY-type (DOUBLE is less accurate!). = errortrap handling (FB: label ...
by BasicJan
Sep 04, 2006 20:28
Forum: Windows
Topic: Problem using combination of compiler-switches
Replies: 2
Views: 1130

Thanks for your reaction.

The -s switch-value should indeed be gui instead of GUI.

The Wiki suggests the -w switch-value is optional (0 as default), but it is propably is not when the -w switch is followed by more parameters.
I just added 0 and now it works fine.
by BasicJan
Sep 04, 2006 17:38
Forum: Windows
Topic: Problem using combination of compiler-switches
Replies: 2
Views: 1130

Problem using combination of compiler-switches

As I use RESUME-statements, the -exx compiler-switch is required. Using this compiler-switch alone works fine. Using the switch together with a different switch causes troubles; fbc -exx -s GUI <file-list> results in: C:\..\bin\win32\ld.exe: invalid subsystem type GUI fbc -w -exx <file-list> results...
by BasicJan
Aug 14, 2006 15:38
Forum: Windows
Topic: Record to many when reading file
Replies: 14
Views: 3184

Record to many when reading file

An old error has occurred again (found in FreeBasic version 0.17, found before in 0.13 or so). If an external file is read, one record to many is found. Try next code. ********** FILE: MAINPROG.BAS ********** DIM LvInput DIM LvCounter LvCounter=0 OPEN "TEST.TXT" FOR INPUT AS #1 DO WHILE NO...
by BasicJan
Aug 12, 2006 20:18
Forum: Windows
Topic: Problem using $Include-files (bug??)
Replies: 3
Views: 1277

Problem using $Include-files (bug??)

Next program exists out of three different files. = Compiling and running with QuickBasic works fine = Compiling and running with FreeBasic version 0.15 works fine = Compiling and running with FreeBasic version 0.16 causes problems. The array DemoText seems to be empty when one tries to print a text...
by BasicJan
Oct 23, 2005 18:05
Forum: Windows
Topic: Place of label in case of error handling.
Replies: 2
Views: 1331

Place of label in case of error handling.

In case of error handling, a label is used; ON ERROR GOTO <label> In case of QuickBasic the label must be outside the SUB or FUNCTION, in case of FreeBasic the label must be inside. Can this be changed in such a way that FreeBasic accepts placement of the label outside the SUB or FUNCTION as well? (...
by BasicJan
Oct 23, 2005 17:57
Forum: General
Topic: problem: undefined reference to `fb_CpuDetect'
Replies: 3
Views: 1708

It is indeed due to the libraries. I had the same problem (with lots of other strange messages).
They disappeared after installing the oct 22-update again;
= make a clean copy of the stabe 0.14b version (not a previous 0.15!).
= add the new 0.15-components.

Good luck!

Jan
by BasicJan
Oct 12, 2005 20:52
Forum: Windows
Topic: Bug in PRINT <positive number>?
Replies: 6
Views: 2260

Bug in PRINT <positive number>?

If a positive number is converted to a string (STR$(<positive number>) or printed (PRINT <positive number>) in QuickBasic a space is placed before the number. In FreeBasic no space is added if a positive number is converted to a string (STR$). However, if a positive number is printed, a space is sti...
by BasicJan
Oct 12, 2005 16:55
Forum: Windows
Topic: Bug in INKEY$
Replies: 4
Views: 2106

The compatibility in old QuickBasic-programs is the reason why I noticed this.

Thanks for fixing.

Jan
by BasicJan
Oct 12, 2005 16:53
Forum: Windows
Topic: Cursor not shown
Replies: 2
Views: 1404

That is propably why QuickBasic uses a mask to define the cursor.
The mask indicates the area (pixels) within a character to be inverted and reinverted in the rhythm of the cursor blinking.

But I don't have any idea how to realise this either.....
by BasicJan
Oct 11, 2005 20:23
Forum: Windows
Topic: Cursor not shown
Replies: 2
Views: 1404

Cursor not shown

By means of the third (optional) parameter of the LOCATE-statement the cursor can be turned on and off.

However I never see any cursor at all.

Try
SCREEN 17 ' or any other screen mode
CLS
LOCATE ,,1 'Show cursor
INPUT "Test";T$
by BasicJan
Oct 11, 2005 20:08
Forum: Windows
Topic: Bug in INKEY$
Replies: 4
Views: 2106

Bug in INKEY$

If a diacritical character is entered using <ALT><ASCII-value> INKEY$ not only responds if the <ALT>-key is released, but also when each of the digits is entered. The entered digit is represented as an extended key. Try next program: SCREEN 17 CLS Contin$="Y" DO WHILE Contin$="Y" Kbd$="" DO WHILE Kb...

Go to advanced search