PureBasic Survival Guide

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Update.

Added Fred's corrections, as well as some additional stuff on Linked Lists, plus some other changes that I forgot :-)

As usual...

http://www.xs4all.nl/~bluez/datatalk/purebasic.htm
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
ignign0kt
User
User
Posts: 59
Joined: Thu Sep 21, 2006 9:09 pm

Post by ignign0kt »

Awesome. Do you plan to add networking?
I hope you keep updating and adding, as this is probably the best tutorial source.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

ignign0kt wrote: Awesome. Do you plan to add networking?
Actually, yes. I'm doing a little move sideways exploring VirtualBox, but only to help wannabe programmers to test there software in server / client configurations, and to explore the real world of MySQL. But all in service of PureBasic :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Update.

Added a page on VirtualBox. This in turn will help testing 'near real life' MySQL and some (tada :-)) network programming. Also added and / or updated a bunch of other things.

Still a lot to rewrite and double check. I guess PB4.31 or 4.40 is on the horizon so that will mean more rewrites. I just hope the PB devs will get the expression evaluation sorted out for good, the current situation is extremely annoying.

As usual...

http://www.xs4all.nl/~bluez/datatalk/purebasic.htm

And for the VirtualBox page...

http://www.xs4all.nl/~bluez/datatalk/pure13.htm#top
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

Greater and greater! Hope you have one (or 2 or 3!) backup of this gold mine. It has been so useful for me to understand some PB principles... Thank you again!
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Updated.

Added a placeholder for 'networking', and swapped the pages of 'virtualbox' and 'databases'.

Plan is now to add more to the databases and networking pages now I have VirtualBox up and running properly.

Will be continued.

http://www.xs4all.nl/~bluez/datatalk/purebasic.htm
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
GG
Enthusiast
Enthusiast
Posts: 257
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Post by GG »

Nice work.

Is it possible to remove hyperlinks which are obsolete ? For example >> here <<, where there are some obsolete links to cvs.purebasic.com (Purebasic CVS).
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

I use a link checker, but appearently it doesn't catch all of them. That's the problem of writing stuff that link to other pages... references might disappear, unfortunately.

I'll try to find them and correct them, but your (the reader's :-)) help is required :-)

If you find stuff missing or links no longer working tell me, I simply don't have the time to guard them, as I keep adding things to the Survival Guide...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
cas
Enthusiast
Enthusiast
Posts: 597
Joined: Mon Nov 03, 2008 9:56 pm

Post by cas »

@blueznl
This guide was the first thing i studied when i heard about PureBasic and i recommend it to everyone new here. There are no words to describe your contribution to PureBasic community. Thank you.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

cas wrote:@blueznl
This guide was the first thing i studied when i heard about PureBasic and i recommend it to everyone new here. There are no words to describe your contribution to PureBasic community. Thank you.
I can give you my bank account number so you won't need words... :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
cas
Enthusiast
Enthusiast
Posts: 597
Joined: Mon Nov 03, 2008 9:56 pm

Post by cas »

:lol:
yrreti
Enthusiast
Enthusiast
Posts: 546
Joined: Tue Oct 31, 2006 4:34 am

Post by yrreti »

:wink: cas is right!
It's the first site I really looked into also.
And your guide has been a valuable source in
understanding how to use PureBasic.
But I especially appreciate your CodeCaddy :!: :!: :!:
My sincere thanks to you too.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

CodeCaddy is now working under 4.30, but I've found some possibile limitations on Unicode compatibility, once I've fixed those I'll release a new version. Note that CodeSync will also work properly again in the next to come version.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: PureBasic Survival Guide - update

Post by PB »

@blueznl: I was just looking through your guide and it says that fixed-length
strings can contain null characters. It also says: "[...] strings cannot contain
a null character (asci code 0). If they contain a zero, they will be truncated!
If you are in a habit of using strings as buffers for binary content (that could
contain one or more zero's) you will have to use so called 'fixed length
strings' [...]"

Can you clarify this? I just tried a${5}="12"+Chr(0)+"45" and a$="12" only.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Demivec
Addict
Addict
Posts: 4086
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: PureBasic Survival Guide - update

Post by Demivec »

PB wrote:@blueznl: I was just looking through your guide and it says that fixed-length
strings can contain null characters. It also says: "[...] strings cannot contain
a null character (asci code 0). If they contain a zero, they will be truncated!
If you are in a habit of using strings as buffers for binary content (that could
contain one or more zero's) you will have to use so called 'fixed length
strings' [...]"

Can you clarify this? I just tried a${5}="12"+Chr(0)+"45" and a$="12" only.
Please pardon my responding before blueznl does.

I think what is meant is that since a fixed length string occupies a certain range in memory, regardless of the contents of that memory, the string can contain nulls. All of PB's string functions such as the assignment operator above will stop when a null is reached. Here's some sample code to demonstrate:

Code: Select all

a${5}
PokeL(@a$,$34003231) ;this places the values for "12", #null,"4" into the strings memory
Debug a$             ;shows "12" because of the #null
PokeB(@a$ + 2,$33)   ;this replaces the #null with "3"
Debug a$             ;shows "1234" because the intervening #null has been removed
Furthermore there is no space set aside for a #null if you are using a fixed-string. If the length is 5 then space for 5 characters will be set aside and not space for 5 characters + #null. The #null is still stored in the memory space though if strings of less than 5 characters are stored there using the PureBasic functions.
Post Reply