Author Topic: Approximation  (Read 8451 times)

0 Members and 1 Guest are viewing this topic.

Offline Kirke

  • Street Thug
  • *
  • Posts: 14
    • View Profile
Re: Approximation
« Reply #15 on: January 20, 2010, 09:34:21 pm »
oh mate, thats bad.

you cannot lead people to believe that you must have vcmp. as part of the alias name.

Do you know how silly that sounds ?

kind regards

Accepted Solution:

Code: [Select]
alias SetWholeNumber !return $iif($gettok($1,2,46) >= 5,$ceil($1),$floor($1))
« Last Edit: January 20, 2010, 09:38:20 pm by Kirke »

Offline Kirke

  • Street Thug
  • *
  • Posts: 14
    • View Profile
Re: Approximation
« Reply #16 on: January 20, 2010, 09:46:24 pm »
no offense intended Skirmant, but your an idiot!


the alias name is irreverent, as long as you don't have any conflicting names,

unless you apply the -l switch which stands for "local alias".

it makes NO difference to the result if the alias is vcmp.blah or just blah

Offline Skirmant

  • Made Man
  • ***
  • Posts: 134
    • View Profile
Re: Approximation
« Reply #17 on: January 20, 2010, 10:07:31 pm »
no offense intended Skirmant, but your an idiot!

You had to piss me off did you?
Here's the ultimate proof

http://www.youtube.com/watch?v=VJySqFjobyA

The video may not be finished processing, but by doing full screen you can see it.
I wish that you would take those words back :)

Offline Kirke

  • Street Thug
  • *
  • Posts: 14
    • View Profile
Re: Approximation
« Reply #18 on: January 20, 2010, 10:47:41 pm »
ok, yea, sorry for pissing you off. but my way is right.

lets look at this from another angle.

why do you think the alias name should be prefixed with vcmp.  ?

can you check you have no other alias names with SetWholeNumber for me.

PS. your way is right too, btw.

Im just interested why its returning 8 when a value of 4.5 is passed to it. as its only returning $celi or $floor of 4.5
« Last Edit: January 20, 2010, 10:51:12 pm by Kirke »

Offline Skirmant

  • Made Man
  • ***
  • Posts: 134
    • View Profile
Re: Approximation
« Reply #19 on: January 20, 2010, 10:52:10 pm »
I pretty much searched everywhere there doesn't seem to be another one.
And I have no idea why it works with vcmp. attached to it. Infact it works with anything attached to it.

Offline Kirke

  • Street Thug
  • *
  • Posts: 14
    • View Profile
Re: Approximation
« Reply #20 on: January 20, 2010, 11:01:54 pm »
well, as long as i know the calculation works, the alias name seem to be the problem (im putting that down to a conflicting name in your script)