1. FIXED - Right()

There. If you want the new version of user.e, just email me personally.
Here's what was wrong with the right() function:

It didn't return anything

Here's how it works now:

It takes your two values you passed it(possibly "foobar",3), and it takes
the characters from length(raw) to length(raw)-chars+1. But it returns
everything backwards! So i fixed that too by reading the result in
reverse, which returned it the right way.

                                                 JARS OF CLAY ROCKZ FOR
GOD
_________________
"When it comes to programming languages, Eu™ by RDS®™©(did i forget an
®?) is a cut above" - Matt1278 and Prezsoft
Webbers: <A HREF="mailto:softprez at juno.com">softprez at juno.com</A>,
president of SoftCo.® Uh, no slogan at the moment™
        Go out and get Euphoria™ by Rapid Deployment Software® NOW!!!

new topic     » topic index » view message » categorize

2. FIXED - Right()

Matt, is this what you mean?

function right(sequence s, integer i)
    return s[length(s)-i+1..length(s)]
end function

>Here's what was wrong with the right() function:

>It didn't return anything

>Here's how it works now:

>It takes your two values you passed it(possibly "foobar",3), and it take=
s
>the characters from length(raw) to length(raw)-chars+1. But it returns
>everything backwards! So i fixed that too by reading the result in
>reverse, which returned it the right way.

new topic     » goto parent     » topic index » view message » categorize

3. Re: FIXED - Right()

no, this is the code for right():

global function right(object raw,integer bytes) --Sep 98
--I made this one
object new,tmp
new=""
tmp=""
for z= length(raw) to length(raw)-bytes+1 by -1 do
    new=new&raw[z]
end for
for z= length(new) to 1 by -1 do
    tmp=tmp&new[z]
end for
new=tmp
return new
end function

                                                 JARS OF CLAY ROCKZ FOR
GOD
_________________
"When it comes to programming languages, Eu™ by RDS®™©(did i forget an
®?) is a cut above" - Matt1278 and Prezsoft
Webbers: <A HREF="mailto:softprez at juno.com">softprez at juno.com</A>,
president of SoftCo.® Uh, no slogan at the moment™
        Go out and get Euphoria™ by Rapid Deployment Software® NOW!!!

new topic     » goto parent     » topic index » view message » categorize

4. Re: FIXED - Right()

Ad Rienks wrote:
> Matt, is this what you mean?
> function right(sequence s, integer i)
>     return s[length(s)-i+1..length(s)]
> end function

Matt wrote:
>no, this is the code for right():
>global function right(object raw,integer bytes) --Sep 98
>--I made this one
>object new,tmp
>new=""
>tmp=""
>for z= length(raw) to length(raw)-bytes+1 by -1 do
>    new=new&raw[z]
>end for
>for z= length(new) to 1 by -1 do
>    tmp=tmp&new[z]
>end for
>new=tmp
>return new
>end function

Matt, before you alienate everyone that has tried
to show you patience, understanding, and respect
for your ignorance, (which is not a bad thing,
stupidity is) I would suggest that you not post
again until you look at the above two posts.

Ad was trying to help you, and you were rude in
your reply to him.

How were you rude? You didn't respect his intelligence
by sitting down and reading his post until you
*understood* that post.  Had you *understood* his
post, you would have seen that his solution to
the 'right()' function accomplished what you desired
while simultaneously being far more elegant, much faster,
more concise, easier to read and easier to maintain.

Instead, you promptly replied in such a manner as
to swiftly place your foot betwixt your palate and
your chin.

Personally, I think you owe Ad an apology,
and I think you need to contemplatively cogitate
concurrent with composition.

Lurk  before you leap,  understand before you utter;
glean before you grate, revere     before you repulse.

--Hawke'

new topic     » goto parent     » topic index » view message » categorize

5. Re: FIXED - Right()

Well, sorrrrry.

On Sat, 17 Oct 1998 15:55:01 -0700 Hawke <mdeland at NWINFO.NET> writes:
>Ad Rienks wrote:
>> Matt, is this what you mean?
>> function right(sequence s, integer i)
>>     return s[length(s)-i+1..length(s)]
>> end function
>
>Matt wrote:
>>no, this is the code for right():
>>global function right(object raw,integer bytes) --Sep 98
>>--I made this one
>>object new,tmp
>>new=""
>>tmp=""
>>for z= length(raw) to length(raw)-bytes+1 by -1 do
>>    new=new&raw[z]
>>end for
>>for z= length(new) to 1 by -1 do
>>    tmp=tmp&new[z]
>>end for
>>new=tmp
>>return new
>>end function
>
>Matt, before you alienate everyone that has tried
>to show you patience, understanding, and respect
>for your ignorance, (which is not a bad thing,
>stupidity is) I would suggest that you not post
>again until you look at the above two posts.
>
>Ad was trying to help you, and you were rude in
>your reply to him.
>
>How were you rude? You didn't respect his intelligence
>by sitting down and reading his post until you
>*understood* that post.  Had you *understood* his
>post, you would have seen that his solution to
>the 'right()' function accomplished what you desired
>while simultaneously being far more elegant, much faster,
>more concise, easier to read and easier to maintain.
>
>Instead, you promptly replied in such a manner as
>to swiftly place your foot betwixt your palate and
>your chin.
>
>Personally, I think you owe Ad an apology,
>and I think you need to contemplatively cogitate
>concurrent with composition.
>
>Lurk  before you leap,  understand before you utter;
>glean before you grate, revere     before you repulse.
>
>--Hawke'
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu