• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

PowerBASIC Address example converted

Started by James C. Fuller, December 04, 2014, 09:40:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

James C. Fuller

Patrice,
This is "c" not c++ so I hope it's ok to post here.
This isn't complete but I want to get back to my c++ studies using Visual Studio 2013 Community and the mfc.
I first found out I needed to convert the ADDRESS.DAT file so I could work with zero padded unicode strings.
I used your PowerBASIC SDK framework with my resource dialog.

Attached are two different versions. One for TinyC 9.26 64bit and one for all the other's.

The TinyC version comes in at 19K while the Visual Studio 2013 Community is 98k.
I'm sure you can get this down. I don't do much optimizing when compiling with my batch files.

PellesC -> 51k
TDM-GCC -> 30k
NUWEN   -> 31k

I ran into one strange..??

this works with TinyC 9.26 64bit    no buffer size here ????

   swprintf(gBuf, L"%ld%ls%ld", gP.currententry,L" /",gP.maxentries)

this is the correct call needed for all other compilers VC++,PellesC,TDM-GCC,NUWEN

   swprintf(gBuf, GBUF_SIZE,L"%ld%ls%ld", gP.currententry,L" /",gP.maxentries)




I also attached the bc9Basic code used to produce the "c" source.

James

Patrice Terrier

James--

I am half way in the c++ convert process of my sdkaddress.bas.

Wait and see...

:)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com