Jump to content


Photo
- - - - -

20 years of rubbish and still counting


21 replies to this topic

#16 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 29 August 2005 - 06:43 PM

You can use either, they both work the same....

Rob D.

#17 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 696 posts
  • Location:Rural France

Posted 30 August 2005 - 08:57 AM

If you think about it,
#v2 = - #v1
is really just syntactic sugar for
#v2 = 0 - #v1

As an semi-relevant aside, I think I once determined that a -ve "constant" such as -3 in ProIV is not a "separately stored number" but is in fact this unary-minus operator applied to the +ve constant 3.
You could in fact test this by applying the old "1=0" bug to change the value of the numeric literal 3 and I think you'll see the value of the numeric literal -3 also change as a result.
I'm sure you really wanted to know that :D
Nothing's as simple as you think

#18 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 30 August 2005 - 10:24 AM

Excellent!!!

Indeed, with the 1 = 0 bug, the negative number is also affected.

Sorry.... I just had to test it :D

Rob.

#19 twallis

twallis

    Member

  • Members
  • PipPip
  • 19 posts
  • Gender:Male
  • Location:Edinburgh

Posted 06 September 2005 - 01:01 AM

Rob,

how did you test that 1 = 0 bug
have to have a look for myself
will try now :p

#20 twallis

twallis

    Member

  • Members
  • PipPip
  • 19 posts
  • Gender:Male
  • Location:Edinburgh

Posted 06 September 2005 - 04:20 AM

Ok I got it

Almost always use Toolkit and it would not let me enter 1
@MODX did though :p

#21 Mike Nicholson

Mike Nicholson

    Expert

  • Members
  • PipPipPipPip
  • 196 posts
  • Gender:Male
  • Location:Stockholm, Sweden

Posted 06 September 2005 - 04:47 AM

Ah, but IDE does. Perhaps you should do something about that Rob ;-)

So that's 1-0 to Toolkit, or 1-1, or 0-1... maybe ... depending how you code it ...

I guess Rob's too busy in Schlager bar to get much coding done now though ;-)

#22 twallis

twallis

    Member

  • Members
  • PipPip
  • 19 posts
  • Gender:Male
  • Location:Edinburgh

Posted 06 September 2005 - 05:19 AM

Thats not a bad idea Rob when you have finish those drinks.

Change IDE to not let literals be passed to globals unless it is input only.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users