|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
'Min 0' does NOTHING!!!
Posted by Joe Johnson.   [PICTURE: SAME | NEW | HELP]
Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems. Posted on 11/8/2000 8:55 PM MST In Reply to: Re: 4x4 software differential,oops posted by James on 11/8/2000 8:10 PM MST: One more thing I just noticed about your PBASIC code. The line of code below will always leave Variable unchanged (even if Variable='-1') Variable = Variable MIN 0 This is because in 16 bit unsigned math, (A MIN 0) is ALWAY equal to A. There is nothing less than 0 in unsigned math. One way of getting around this is to do the following: Variable = $8000 + Variable MIN $8000 - $8000 Now if Variable='-1' before the statement it will equal 0 after. This is a very important lesson to learn when working with PBASIC. Joe J. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SCRRF Design Classes | Redhead Jokes | Southern California Regional Robotics Forum | 0 | 10-07-2003 17:29 |
| which software | Ryan Foley | 3D Animation and Competition | 5 | 01-03-2003 23:39 |
| any one get the software yet?! | activemx | 3D Animation and Competition | 17 | 28-11-2002 19:06 |
| software software software | archiver | 2001 | 5 | 24-06-2002 00:21 |
| Reactor software? | Adrian Wong | 3D Animation and Competition | 4 | 15-01-2002 16:45 |