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 »

i had so many requests for this so i finally gave in... you can now download a downloadable copy of the survival guide... visit the pages and download it if you want, note that it's just a bunch of html files grouped together but it works, sort of

here's the direct download link

http://www.xs4all.nl/~bluez/datatalk/survival_guide.arj
( 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... )
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

blueznl wrote:i had so many requests for this so i finally gave in... you can now download a downloadable copy of the survival guide... visit the pages and download it if you want, note that it's just a bunch of html files grouped together but it works, sort of

here's the direct download link

http://www.xs4all.nl/~bluez/datatalk/survival_guide.arj
Unless you keep repackaging folks may want to still consider coming back to your pages online for up-to-date coverage?
Intrigued - Registered PureBasic, lifetime updates user
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

that would be smarter, yes :-)

(though repackaging is done by a little batch file, so it ain't that bad :-) i just tend to forget to do that :-))
( 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... )
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Ah. Arj! * fires up 7zip *

Thanks, blueznl. It will be handy as a general offline reference!
@}--`--,-- A rose by any other name ..
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

yeah i admit i'm an oldie by now

to be honest, wanted to zip it first, but found out i don't have a command line zip thingy installed anymore :-)

besides, i always liked arj and arj32 just that little bit more...
( 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 »

slight update / error correction on the unicode part...
( 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
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

@blueznl: thanks for your hard work :!: :D

I would be happy if you agree to release the offline version on tutorials page on www.PureArea.net :)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

This really is outstanding work. Well done, and thanks.
I may look like a mule, but I'm not a complete ass.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

andre, how do you mean? you want to host the .arj file or something? if so go ahead :-)
( 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
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

blueznl wrote:andre, how do you mean? you want to host the .arj file or something? if so go ahead :-)
Exactly (probably as .zip too) - so thanks. :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
akee
Enthusiast
Enthusiast
Posts: 475
Joined: Wed Aug 18, 2004 9:52 am
Location: Penang, Malaysia

Post by akee »

Hmmmm.... The doc still states that PB is 59 euro. I think it is now US$69... :)
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

there is both prices in fact.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

akee wrote:Hmmmm.... The doc still states that PB is 59 euro. I think it is now US$69... :)
don't forget, the guide is totally unofficial unsupported and pretty much useless anyway, so i can get away with anything i say, sort of :-)
( 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... )
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Either there are some errors and omissions with your description of PB's type conversions, or there's some bugs in PB. :wink: You and Fred should decide what these are.
expressions are evaluated left to right
Unless you're really unlucky:

Code: Select all

Procedure Test(b)
  Debug b
EndProcedure

; This is evaluated from right to left
c = Defined(a, #PB_Variable) + a + Defined(a, #PB_Variable)
Debug c

; From the middle and outwards to the sides?!?!?!?
Test(Defined(z, #PB_Variable) + z + Defined(z, #PB_Variable))
types 'change upwards' in this sequence: long> quad > float > double
types never change 'downwards'

Code: Select all

a.l
f.f
d.d

; Type changes downwards from float to long here
;             V
q.q = 2*(92/8.+5)
Debug q

; And here    V
Debug 2*(92/8.+5)

a = 2*(92/8.+5)
Debug a

f = 2*(92/8.+5)
Debug f

d = 2*(92/8.+5)
Debug d

Code: Select all

f.f
q.q

; The type changes here from quad to long to float
; That's downwards from quad to long
;     V
a = q + f
Note that not only the Cos() itself, but also the parameters of Cos() can force a typechange!

Code:

a.f = Cos(z.f)+10*22
b.f = Cos(z.d)+10*22

In the above the expression behind a.f is evaluated as a float, whilst the one behind b.f is evaluated as a double
That makes it sound as if that was the case for all functions, but actually Cos() is a special "overloaded" function that returns a float if passed a float and returns a double if passed a double. Only the return type of a function can force a typechange.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

a.f = 3
b.l = 1 + 2 / a.f

Notice the mathematic priority! It's NOT going to do something like ( 1 + 2 ) / 3 but it does 1 + ( 2 / 3 ). However, it will not start with typing a float as it still works from left to right.
Here, the 1 will acutally be treated as a float although you give the impression that that will not happen. Why?
Because: 2/a.f is a float, and when you add a constant and a float the result is a float. Also, the result of the entire expression is a float because if the 1 was a long it would be converted. It would be faster to add after the division because that would make the convertion more efficient, but the result is the same, the integer at 1 will be converted to a float.
h.q[10,10] ; takes 10x10x4 = 400 bytes (an array of 10 by 10 quads)
How many bytes does a quad use?

A 'global' variable can be changed from anywhere in the program, except under the following conditions:
another variable with the same name is declared Protected or Static inside a procedure
the same variable name was used as a parameter in a procedure definition
And, it cannot be changed before it was declared as global.

Variables are always local to the procedure they are defined in.
Unless, they are declared as global inside that procedure.
Post Reply