er... 17b differences?

General FreeBASIC programming questions.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

er... 17b differences?

Post by agamemnus »

Code: Select all

(1) error 135: Only valid in -lang deprecated or qb, found 'defint' in 'cls: defint a-z'

(2) error 137: Suffixes are only valid in -lang deprecated or qb, found 'temp' in 'declare sub replace (byref temp$, a$, b$)'

(2) error 137: Suffixes are only valid in -lang deprecated or qb, found 'temp' in 'declare sub replace (byref temp$, a$, b$)'
???
Last edited by agamemnus on Jun 05, 2007 20:35, edited 1 time in total.
dani.user
Posts: 284
Joined: Sep 30, 2006 10:41

Post by dani.user »

Compile you program with

fbc -lang deprecated file.bas
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Post by agamemnus »

Ya, i know.

If these things are deprecated, i could not find the documentation for it, nor info on the replacement in the wiki.
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Post by DrV »

Read migrating.txt in the FreeBASIC distribution.
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

to late double post :-)
Infos are in the migration.txt file in your freebasic folder.
(if it what you will looking for)

Joshy
Last edited by D.J.Peters on Jun 05, 2007 21:26, edited 1 time in total.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Post by agamemnus »

Wow.

I hope that once your object oriented stuff is added, you can begin supporting the QB stuff (eg: without using -lang qb) again.
ikkejw
Posts: 258
Joined: Jan 15, 2006 15:51
Location: Fryslân, the Netherlands
Contact:

Post by ikkejw »

dani.user wrote:Compile you program with

fbc -lang deprecated file.bas
If you use defint and write your variables like$ this% you should be compiling with -lang qb

;)
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Post by anonymous1337 »

agamemnus wrote:I hope that once your object oriented stuff is added, you can begin supporting the QB stuff (eg: without using -lang qb) again.
Is there a reason that this would work when FB's OO stuff is more complete? I don't see as to why this would be, unless QB was put in it's own Class? :P Even then a compiler option vs using langQB, doesn't really seem like it would be bad.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Post by agamemnus »

anonymous1337 wrote:
agamemnus wrote:I hope that once your object oriented stuff is added, you can begin supporting the QB stuff (eg: without using -lang qb) again.
Is there a reason that this would work when FB's OO stuff is more complete? I don't see as to why this would be, unless QB was put in it's own Class? :P Even then a compiler option vs using langQB, doesn't really seem like it would be bad.
Cause it seems that the new 17b version with -lang qb has fewer features than the 16c version...
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Post by anonymous1337 »

agamemnus wrote:Cause it seems that the new 17b version with -lang qb has fewer features than the 16c version...
Well, afaik, a lot of compatibility issues with QB have been fixed since the -lang qb came out. I don't recall any compatibility being lost with -lang qb...
Antoni
Posts: 1393
Joined: May 27, 2005 15:40
Location: Barcelona, Spain

Post by Antoni »

The -lang qb switch has brought us back some QB features that were missing since the first versions of FB.

The most important :
-Defaut variable type is back to SINGLE
-Byte alignment of UDT is now the default
-STR left-pads positive integers with a space again
-RND uses a clone of QB's algorithm by default
-LOCATE accepts the full 5 arguments accepted by QB (but the last 2 have no effect)

This is not yet complete compatibility but it's a lot closer.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Post by agamemnus »

Some of that is terrible, though.... I coded some programs with the no-space-padding thing and now it's back. I could not use the -lang qb option but then other things will break. =\
counting_pine
Site Admin
Posts: 6323
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Post by counting_pine »

I've never been a fan of the space-preceded str() function, but I guess it's necessary for QB programs to work more as expected. To remove the space, ltrim(str(...)) still works, and will give consistent results between the different dialects, but it doesn't look particularly nice (though that could be covered up with a macro) and it's not as efficient.

One problem with "-lang qb", which I think probably hurts it most, is the lack of variable initialisers (e.g. dim a as integer = 2). If like to use them, it's one the biggest stumbling blocks to writing code that will compile in all three dialects, and it's mainly for this reason that I generally don't consider it worthwhile.

For some situations, in many ways, "-lang deprecated" is a happy medium. Many (reasonably well-written) programs written in QBASIC can work OK in it without needing changes, and the same can be said for programs written in the new dialect that don't use any advanced features.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

Code: Select all

Cause it seems that the new 17b version with -lang qb has fewer features than the 16c version...
Read changelog.txt, thanks.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Post by agamemnus »

cha0s wrote:

Code: Select all

Cause it seems that the new 17b version with -lang qb has fewer features than the 16c version...
Read changelog.txt, thanks.
Where are you going with this? Your qb compatibility fixes are nice, but counting prime said:

>One problem with "-lang qb", which I think probably hurts it most, is the lack of variable initialisers (e.g. dim a as integer = 2). If like to use them, it's one the biggest stumbling blocks to writing code that will compile in all three dialects, and it's mainly for this reason that I generally don't consider it worthwhile.

What other things are killed with -lang qb?
Post Reply