Anybody know of a function that can remove (normalize) a string
by remove all beginning and ending whitespace
uses SysUtils;
S:=Trim(S);
as well as replace all repeated spaces with a single space.
uses StrUtils;
S:=DelSpace1(S);
A bonus would be to remove tabs and newlines chars as well
a := b ror c;
x := y rol z;
It would wreck havoc with typing. What should the result be of "1 ror
1"? $80? $8000? $8000? $8000? $8000 on 32 bit and
$8000 on 64 bit cpus?
I believe the compiler knows the datatype and make an appropriate rotate action
based o
> Adding new operators is much more work and error prone than
Agree. I never made a compiler, and I hope I won't, nor interested. :D
I did make a simple SQL engine, though. AFAIK, adding a new operator, especially
when a "similar" operator has existed before, wouldn't be too difficult. But, I
On 5/26/06, Cox, Stuart TRAN:EX <[EMAIL PROTECTED]> wrote:
The __CvtStr function used the _REM_LEAD_WHITE_STR +
_REM_TRAIL_WHITE_STR
For this you can just use the Trim function.
+ _REDUCE_WHITE_STR
This looks easy to implement. You can just create your own function for this.
for i := 0 to
Blaise Computing's "Power Tools Plus" offered just such a function in
their Unit_Str unit.
The __CvtStr function used the _REM_LEAD_WHITE_STR +
_REM_TRAIL_WHITE_STR + _REDUCE_WHITE_STR combination of constants to
achieve what you'd like to do.
I have the full source to all their units, but, as th
On Thu, 25 May 2006, mariano podesta wrote:
> >
> > > > This looks to me like a delphi bug.
>
>
> a bug? are you serious?
>
> A unit must be a valid pascal
> > > > identifier.
>
>
> fpc just support valid standard pascal? this is not what i heard.
> delphi7 supports it since 2002. not a .net rel
On 26 May 2006, at 19:35, L505 wrote:
The length bytes of those shortstrings aren't initialised if you
don't do setlength(). It has nothing to do with memory allocation,
but with initialisation.
Learn something new today - I unfortunately don't have a
turbopascal background and in
this case
> > var
> > filename: string;
> > last3: string[3];
> > last4: string[4];
> >
> this is not short strings
> use
> last3: shortstring[3];
In delphi 5 and FPC in objfpc mode it doesn't accept that.
___
fpc-pascal maillist - fpc-pascal@lists.fre
> > I'm lacking some memory concept here. Below program doesn't work
> > unless setlengths
> > are called first on the shortstrings.
> >
> > program Project1;
> >
> > {$mode objfpc}{$H+}
> >
> > var
> > filename: string;
> > last3: string[3];
> > last4: string[4];
> > begin
> > filename:= '
On 26 May 2006, at 14:10, L505 wrote:
I'm lacking some memory concept here. Below program doesn't work
unless setlengths
are called first on the shortstrings.
program Project1;
{$mode objfpc}{$H+}
var
filename: string;
last3: string[3];
last4: string[4];
begin
filename:= 'test';
L505 napisaĆ(a):
I'm lacking some memory concept here. Below program doesn't work unless
setlengths
are called first on the shortstrings.
program Project1;
{$mode objfpc}{$H+}
var
filename: string;
last3: string[3];
last4: string[4];
this is not short strings
use
last3: shortstring[
On 26 May 2006, at 16:36, Bisma Jayadi wrote:
Agree! Since these are very important and relatively commonly used,
I think it'd be better if they're implemented as new operators
("ror" and "rol") rather than as functions. Say we'll able to code
like this:
a := b ror c;
x := y rol z;
Just
Bisma Jayadi wrote:
>> That's the point why I want to include compiler support: rol/ror is very
>> important for several cryptographic algorithms.
>
> Agree! Since these are very important and relatively commonly used, I
> think it'd be better if they're implemented as new operators ("ror" and
> "
mariano podesta wrote:
> > > This looks to me like a delphi bug.
>
>
> a bug? are you serious?
Of course, asdf.asdf is no valid pascal identifier.
>
> A unit must be a valid pascal
> > > identifier.
>
>
> fpc just support valid standard pascal? this is not what i heard.
> delphi
That's the point why I want to include compiler support: rol/ror is very
important for several cryptographic algorithms.
Agree! Since these are very important and relatively commonly used, I think it'd
be better if they're implemented as new operators ("ror" and "rol") rather than
as functions
Hi,
Anybody know of a function that can remove (normalize) a string by
remove all beginning and ending whitespace as well as replace all
repeated spaces with a single space. A bonus would be to remove tabs
and newlines chars as well, but that is not so important.
Example:
Before: " This is
I'm lacking some memory concept here. Below program doesn't work unless
setlengths
are called first on the shortstrings.
program Project1;
{$mode objfpc}{$H+}
var
filename: string;
last3: string[3];
last4: string[4];
begin
filename:= 'test';
filename:= filename+ 'ing.pas';
setlength
Hi,
Does anybody know of a decent (even a half decent one will do) sql
tool for GNU/Linux that can connect to a Firebird database. By that I
mean one that I can write and execute sql statements. I don't need a
DB admin (create tables, etc) as I do that manually via scripts.
I have been using is
> > This looks to me like a delphi bug.a bug? are you serious?
A unit must be a valid pascal> > identifier.
fpc just support valid standard pascal? this is not what i heard. delphi7 supports it since 2002. not a .net release.
Or is there any use in supporting this?ofcourse there is a use.you see
19 matches
Mail list logo