Re: String?

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tue, 01 Jun 2004 20:00:15 +0000, StewartML <Stewart at isoclass.co.uk>
wrote:

<snip>
>if you ever see the need to output the integer values of a string,
That particular need could be easily met, eg:
sequence s
string t
    t="hello"
    s=repeat(0,length(t))
    for i=1 to length(t) do
        s[i]=t[i]
    end for

As an application programmer, I would have no qualms with having to do
something like that to "rip apart" a string, and of course if you do
need such in several places, it is trivial to code as a function.

>or vice versa, then you could just assign it to the relevant data type,
I think you can guess how I think a sequence could easily be converted
into a proper string (with integer(), >0, and <256 checks, of course)

It may be tempting to think you can automate such conversions, but I
think that will (may) cause problems, and is not really needed.

(btw, thanks - that just cleared up a few things for me)

>
>The major problem i have with sequences is the fact that you need to use 
>equal() for simple strings.
Tell me about it blink Apart from the way upper() and lower() are
currently implemented (which cannot in anyones mind be the best), just
how often are =, !=, <, <=, >, >= actually used as sequence ops?

Regards,
Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu