Page 1 of 1
Shannara Libs 0.1
Posted: Wed Jun 23, 2004 2:09 am
by Shannara
These are two simple libraries I put together. I am starting a collection of libraries of simple commands and such for PB users.. *shrugs*
AppPath = Returns applicaton path
FileExist(Filename$) = Returns whether given file exist or not.
http://www.pbcode.com/shannaralibs/ShannaraLibs0.1.rar
To Install: Extract libraries into your purebasic's UserLibraries directory, and restart the compiler.
These are free to use for any reason, except claiming they are yours
I'll be posting more libraries and updates as I find the time.
Re: Shannara Libs 0.1
Posted: Wed Jun 23, 2004 2:14 am
by NoahPhense
Shannara wrote:These are two simple libraries I put together. I am starting a collection of libraries of simple commands and such for PB users.. *shrugs*
AppPath = Returns applicaton path
FileExist(Filename$) = Returns whether given file exist or not.
http://www.pbcode.com/shannaralibs/ShannaraLibs0.1.rar
To Install: Extract libraries into your purebasic's UserLibraries directory, and restart the compiler.
These are free to use for any reason, except claiming they are yours
I'll be posting more libraries and updates as I find the time.
Nice, glad to see your contributions.
- np
(enjoyed your site btw)
Posted: Wed Jun 23, 2004 2:18 am
by Shannara
What site? hehe. I gotta fix that...
Also, I know these are like, hardly any contribution but.. *shrugs* Still working on the AES/DES encryption library, and the WebCam library. I should be adding the screenshot library soon.
..
Posted: Wed Jun 23, 2004 2:38 am
by NoahPhense
Shannara wrote:What site? hehe. I gotta fix that...
Also, I know these are like, hardly any contribution but.. *shrugs* Still working on the AES/DES encryption library, and the WebCam library. I should be adding the screenshot library soon.
Excellent, I too have been punching out a enc/dec algo for about 2 years
now. It's usage will be endless, from data files, inet comms, but its
original intention is machine dependant software registration. I have a
team or two on standby to make their attempts on it. Upon them failing
which they will.

It will be released.
- np
Re: Shannara Libs 0.1
Posted: Wed Jun 23, 2004 3:03 am
by PB
> FileExist(Filename$) = Returns whether given file exist or not.
You do know that if FileSize = -1 then the file doesn't exist, right?
(I'm thinking perhaps you're re-inventing the wheel for no reason).
Posted: Wed Jun 23, 2004 3:05 am
by Shannara
Yep

1 a return of 1 for this function = false. Though, if there are any #True #False built in PB constants, I'll use those for returns...
Posted: Wed Jun 23, 2004 3:13 am
by Shannara
Got done looking at the constants list for PB found @
http://purebasic-cvs.dyndns.org/index.c ... web-markup
Believe it or not, there are no #True and #False constants, thus no standard boolean.. erk!???
Will there be some boolean constants in PB coming up any time?
Posted: Wed Jun 23, 2004 3:30 am
by PB
> Believe it or not, there are no #True and #False constants

Yes there are... this works fine for me:
Code: Select all
Debug #TRUE ; Returns 1
Debug #FALSE ; Returns 0
Posted: Wed Jun 23, 2004 3:36 am
by Shannara
Grr, another undocumented feature... PB really need some docs...
The FileExist library have been updated....grrr
Same URL.
Posted: Wed Jun 23, 2004 8:52 am
by Fred
As always, please use name convention which won't interfer with future PureBasic commands or your lib will be broken.
Posted: Wed Jun 23, 2004 9:05 am
by blueznl
shanarra, you're wrong there about booleans...
have a look here:
http://www.xs4all.nl/~bluez/datatalk/pu ... and_binary
and scroll down to 'test against zero'
- if it's zero, it's false
- if it's not zero, it's true
#True and #False are two standard constants
you CANNOT do:
if a = #true
as that is comparing a with 1, unless you have done a a = #true before
you can do:
if a
or
if a <> #false
also, if you look into the x_lib file, you'll find a x_exist() function similar to what you propose, so... i guess everybody (including me

) is reinventing the wheel

Posted: Wed Jun 23, 2004 4:50 pm
by Shannara
Well, I come from a VB background

App.Path and FileExist are two common functions from there

So I sought to replicate the functions for PB. With as close of name to the VB counterpart as possible
The link I posted was supposed to be the most updated link for PB constants out there as it is in the cvs

Turns out it is not so

Posted: Wed Jun 23, 2004 4:58 pm
by blueznl
i think they were added after 3.81, as in 3.81 i had to define them myself

..
Posted: Wed Jun 23, 2004 7:58 pm
by NoahPhense
blueznl wrote:i think they were added after 3.81, as in 3.81 i had to define them myself

Interesting, so is there a 'current' list of constants? I have two older ones
floating around here.
- np