Main Menu

FB 1.07

Started by José Roca, June 18, 2019, 03:22:58 PM

Previous topic - Next topic

José Roca

CoderJeff has been making changes to the compiler to allow seamless integration of UDT classes that extend ZTRING/WSTRING with FB intrinsic functions.

So far, the only changes that I have needed to do to the WinFBX framework are:


#if __FB_VERSION__ < "1.07.0"
TYPE CWSTR
#else
TYPE CWSTR EXTENDS WSTRING
#endif


This makes the class compatible with the new version and older versions.

With the new version we can do:


DIM cws AS CWSTR = "Дмитрий Дмитриевич Шостакович"
AfxMsg MID(cws, 2)


instead of:


DIM cws AS CWSTR = "Дмитрий Дмитриевич Шостакович"
AfxMsg MID(**cws, 2)


Although ** is still valid and will work both with the new and the older versions.

I also have removed a wrong cast (not caught by te older versions) in the AfxBase64EncodeW and AfxBase64DecodeW functions in AfxStr.inc.

The latest builds of the compiler are available at:

http://users.freebasic-portal.de/stw/builds/

#553 (17.06.2019 05:26:33)
udt-wstring: PRINT/LPRINT/WRITE will accept UDT as Z|WSTRING (commit: 3368c2f) â€" coder
#552 (16.06.2019 19:50:20)
udt-wstring: allow type extends zstring|wstring (commit: 176a562) â€" coder
udt-wstring: LTRIM, RTRIM, TRIM will accept UDT as z|wstring (commit: f02b30d) â€" coder
udt-wstring: LCASE, UCASE, will accept UDT as z|wstring (commit: da305e5) â€" coder
udt-wstring: allow UDT->wstring conversions in astNewCONV (commit: adc12dd) â€" coder
udt-wstring: INSTR, INSTRREV, will accept UDT as z|wstring (commit: 7a96a53) â€" coder
udt-wstring: MID function will accept UDT as z|wstring (commit: 47b461e) â€" coder
udt-wstring: SADD/STRPTR will accept UDT as Z|WSTRING (commit: 57360ed) â€" coder
udt-wstring: add TYPE EXTENDS Z|WSTRING [, udt] (commit: 9220036) â€" coder
udt-wstring: LSET/RSET statements will accept UDT as z|wstring (commit: d5272bd) â€" coder
udt-wstring: MID statement will accept UDT as Z|WSTRING (commit: 135f364) â€" coder
udt-wstring: ASC function will accept UDT as Z|WSTRING (commit: 2e7d606) â€" coder
udt-wstring: STR/WSTR function will accept UDT as Z|WSTRING to return a (commit: aefa43e) â€" coder
udt-wstring: SELECT statement will accept UDT as Z|WSTRING to return a (commit: f2fbc61) â€" coder
udt-wstring: SWAP statement will accept UDT as Z|WSTRING (commit: d9a09d7) â€" coder
udt-wstring: IIF function will accept UDT as Z|WSTRING (commit: ff66fc1) â€" coder

José Roca

BTW the new compilers have implemented the -strip and -nostrip options to remove or not local symbols. Without using -strip, the size of the .exe is bigger.

José Roca

I have also changed all occurrences of BYREF AS CONST WSTRING to BYREF AS WSTRING.

Paul Squires

Excellent, thanks Jose. I am not ready yet to upsize WinFBE to FB 1.07 but I will. I want the editor to always be using close to the latest version of FB as possible.
Paul Squires
PlanetSquires Software

José Roca

The main change is that you no longer will need to use ** when working with CWSTR and the new compilers. With the small conditional changes that I have made to the WinFBX classes, you can use ** with older compilers and omit ** with the new compilers. Old code that uses ** will work both with the old and the new compilers. Therefore, you don't need to change existing code.

José Roca

I have needed to make a small change to the CMaskedEdit control. All the other code seems to be working correctly.

José Roca

Modified WinFBX files.

Joerg B.

Hello José

Many thanks for the adaptations.
Greeting from Germany

Joerg

José Roca

#8
I have made some small modifications in the declarations to deal with constant ansi strings.

José Roca

I'm having problems when trying to compile with the latest released 64 bit compiler. While everything works fine with the 32 compiler, the 64 bit one doesn't find "windows.bi".

Command Line:
C:\Programs\WinFBE\FreeBasic-1.07.0\fbc64.exe -m "C:\Programs\Tests\00.bas" "" -v -s gui -i "C:\Programs\WinFBX" -w pedantic

FreeBASIC Compiler - Version 1.07.0 (08-25-2019), built for win64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
target:       win64, x86-64, 64bit
compiling:    C:\Programs\Tests\00.bas -o C:\Programs\Tests\00.c (main module)
C:\Programs\WinFBX\Afx\CWindow.inc(14) error 23: File not found, "windows.bi" in '#include once "windows.bi"'


Joerg B.

Hello José

Is this really the current version?
My currently installed compiler is shown with version 1.08.0.
Greeting from Germany

Joerg

José Roca

It is the last version released. 1.08 must be a work in progress.

Paul Squires

....I'm setting up WinFBE with the new compiler. I'll post a download link for you to try shortly.
Paul Squires
PlanetSquires Software

Paul Squires

Here is a first try at the integration:  https://www.planetsquires.com/files/WinFBE_Suite_107.rar

I tried a few compiles. Simple source code files seemed to compile okay for 32 and 64, but more involved source codes failed with various syntax errors. I need to read up on the big changes, or maybe there is a difference between the old 1.06 *inc files and the new 1.07 inc files.
Paul Squires
PlanetSquires Software

Joerg B.

#14
Hello José
I also installed the current version 1.07.0 from the FreeBasic Forum.

I do not get the described error with me.
Greeting from Germany

Joerg