Go to Post I voted to keep Stop Build Day but only for students. Mentors get to keep working on the robot. - marshall [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2003, 15:11
AndyKK2's Avatar
AndyKK2 AndyKK2 is offline
Registered User
#1039 (CSR: Chief Sealth Robotics)
 
Join Date: Jan 2003
Location: Seattle
Posts: 1
AndyKK2 is an unknown quantity at this point
Min/Max Problems?

After days of staring blankly at four lines of seemingly flawless yet obviously disfunctional code, we discovered that the problem was in our MIN and MAX functions. Turns out MIN gives the max and MAX gives the min? Has anyone else had problems with this? Maybe that makes sense to some people, but doesn't it seem a bit backwards?
__________________
I'm not as think as you confused I am!
  #2   Spotlight this post!  
Unread 16-02-2003, 20:23
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Question ...?

umm... if thats hapening, then there is something wrong with your compiler or code. Why don't you post some of the faulty/questionable code so i can look it over?

-Kesich
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
  #3   Spotlight this post!  
Unread 16-02-2003, 21:12
Ameya's Avatar
Ameya Ameya is offline
Freelance Goon
FRC #0293 (SPIKE Robotics)
Team Role: Alumni
 
Join Date: May 2001
Rookie Year: 2000
Location: Pennington, NJ
Posts: 67
Ameya is on a distinguished road
Send a message via ICQ to Ameya Send a message via AIM to Ameya
Yeah, it seems kind of odd that MIN returns the maximum of the arguments while MAX returns the minimum, but it makes sense if you think about it in another way:

MIN sets the minimum allowable value of an expression to another value.

MAX sets the maximum allowable value of an expression to another value.

So if you do
a = a + 1 MAX 127
then a will increment, but will never go higher than 127.

Hope that helps you understand.
__________________
Ameya Agaskar
Team 293 alumnus
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you all have problems with.... Munkaboo Website Design/Showcase 19 03-03-2003 19:51
EduRobotics problems Ian Mackenzie Robotics Education and Curriculum 22 14-12-2002 11:33
Joystick problems archiver 2001 3 24-06-2002 02:40
Radio problems -- not archiver 2000 1 23-06-2002 22:23
Speed Controller/PWM problems.... Clark Gilbert Technical Discussion 8 08-01-2002 00:14


All times are GMT -5. The time now is 04:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi