I have freebasic version 0.4.6 of 19 feb 2006. Out of bad experience I will not in future up-grade the program. I have many (140) programs which I use in my daily work as engineer. Many of those I can not use today as freebasic is not backward compatible. In event they have to be re-written. Too bad!!!
An other problem is language (#lang ): It is possible to use CHR(***) (*** = number) in "fblite" but not in "qb". I speak a foreign language (Danish), and
use a number of "strange" letters the same problem do other languages have. It means to use of ASII-codes larger than 128. The problems pop up both
on the screen and also on the printer.
I do understand why Windows are not backward compatible, they have to rob users for money, But not Freebasic!
Yours sincerely
Niels Olsen
Denmark
Backward compatible
-
- Posts: 29
- Joined: May 28, 2006 18:32
- Location: denmark
-
- Posts: 862
- Joined: May 05, 2015 5:35
- Location: Germany
Re: Backward compatible
I can't confirm that. I've never had any trouble compiling old sourcecode with newer FB versions.
In "qb" the "string" suffix (CHR$(***)) is mandatory.niels olsen wrote: It is possible to use CHR(***) (*** = number) in "fblite" but not in "qb".
Re: Backward compatible
How can you have the version 0.4.6? There is no such version on Sourceforge (https://sourceforge.net/projects/fbc/fi ... 0versions/), neither is it mentioned in the changelog (https://github.com/freebasic/fbc/blob/m ... ngelog.txt)
Also: in 2006 FreeBasic was still in beta (the first version was of September 2004, in February 2006 it was little more than one year old). It is absolutely normal that any programming language, at such a stage, is not completely defined, and so many things get changed, based on the experience and the feedback. For that reason, it is common knowledge that programming languages in beta stages should never be used in production.
Also: in 2006 FreeBasic was still in beta (the first version was of September 2004, in February 2006 it was little more than one year old). It is absolutely normal that any programming language, at such a stage, is not completely defined, and so many things get changed, based on the experience and the feedback. For that reason, it is common knowledge that programming languages in beta stages should never be used in production.
Last edited by angros47 on Sep 06, 2022 21:32, edited 2 times in total.
Re: Backward compatible
I guess confusion with FBIde 0.4.6 (Feb 19 2006).
To get FreeBASIC version, run:
To get FreeBASIC version, run:
Code: Select all
Print __FB_Version__
Sleep
Re: Backward compatible
0.4.6 is the FBIDE version, I believe.
EDIT: FXM beat me by seconds.
EDIT: FXM beat me by seconds.
Re: Backward compatible
A brand new CHR() macro for #lang "qb"
Code: Select all
#lang "qb"
#undef chr
#define chr(start...) chars(size(#start),start)
Function chars Cdecl(x,...) As String
Dim As String s
s=String$(x,0)
Dim args As __cva_list
__Cva_Start( args, x )
For i As Long =0 To x-1
s[i]=__cva_arg(args,__ubyte )
Next i
__cva_End( args )
chars=s
End Function
Function size(s As String) As Long
Dim As Long ct
For n As Long=0 To Len(s)-1
If s[n]=Asc(",") Then ct+=1
Next
size= ct+1
End Function
Print Chr(68,101,110,109,97,114,107,32,105,115,32,97,32,103,114,101,97,116,32,99,111,117,110,116,114,121,46)
Print Chr(70,114,101,101,66,65,83,73,67,32,104,97,115,32,109,111,118,101,100,32,111,110,32,115,105,110,99,101,32);
Print Chr(50,48,48,54,46)
Print Chr(80,108,101,97,115,101,32,112,114,101,115,115,32,97,110,121,32,107,101,121,32,116,111,32,101,120,105,116,32,46,32,46,32,46)
Sleep