L schrieb:
I wrote:
In KOL, Kladov also returns a zero with his Str2Int function if string is
bad.
You may be thinking.. but what if the string really is a zero and we want to
know that it is?
Well then we can do this:
if (s = '0') or (StrToInt(s) 0) then writeln('S is an integer');
if
y
Op Tue, 16 Oct 2007, schreef L:
Functions like strtoint however have raise calls.
Yes, but there already exists a raise-less version of strtoint, called
val. So, there is IMO absolutely no need for an exceptionless version of
strtoint in another unit.
Of course we can use our
I wrote:
In KOL, Kladov also returns a zero with his Str2Int function if string is bad.
You may be thinking.. but what if the string really is a zero and we want to
know that it is?
Well then we can do this:
if (s = '0') or (StrToInt(s) 0) then writeln('S is an integer');
if
I wrote:
for functions that have raise calls like
wraptext/comparetext/strtoint.
Spoke to soon.. it's good news for those functions.
Looks like wraptext/comparetext are standalone anyway, according to what I see
in compactsyutils on my svn.
So mainly its the strtoint strtobool functions that
Let's first discuss a plan, then we'll see about the name. Suppose we put =
everything that does something with paths and files in a unit:
* Extractfilepath and friends
* Exec, findfirst, etc.
... then it could be called something like fsutils, fs from filesystem.
So, let's first discuss
Op Tue, 16 Oct 2007, schreef L:
Let's first discuss a plan, then we'll see about the name. Suppose we put =
everything that does something with paths and files in a unit:
* Extractfilepath and friends
* Exec, findfirst, etc.
... then it could be called something like fsutils, fs