Go to Post since when is not sleeping, caring more about the robot and such bad for you? If it is how come I didn't get the memo? :ahh: - Sakura141 [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 30-10-2002, 14:50
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: Re: The CODEX

Quote:
Originally posted by Jnadke


6. Debug the robot code. Upload it and go through all the purpose of the subroutines and make sure they do what they were intended to. This should be the longest process of coding the robot. No matter how good of a coding job you think you did, it's better to find out something doesn't work now than on the playing field.


Of course, all these recommendations depend on if you like object-oriented code. My attempt at coding was to make PBASIC object-oriented. It succeeded, but object-oriented isn't what PBASIC is intended to be. Object-oriented means that there are certain areas of the code (functions, subroutines, etc) that are designed to accomplish a specific task. These functions/subroutines are then called by the main code to accomplish these tasks.

C++ and JAVA are object-oriented programming languages. BASIC is not, however (along with many others).
If you do steps 1-5 correctly, and use pseudo-code in step 5, step six should actually be one of the shortest steps in the whole process.

As for object-oriented, what you are actually talking about is "modular" or "procedural" programming (it's NOT "functional", despite what many people/books say). Object-oriented would imply that you somehow encapsulated the data and functions into one big "object." The only real way to semi-sorta-kinda-maybe do object-oriented stuff in PBASIC is to use multiple program slots. That way, all the variables are stored in the same place as the functions that manipulate them. Even then, the data can manipulated by any object at will since everything uses one shared block of memory.

In either event, breaking your code into small pieces is a VERY good idea. It will make debugging much easier and will make it far simpler to make changes some time in the future.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
 


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
my idea of a question forum... Ken Leung General Forum 12 30-11-2002 12:17
Joe - Please answer my question archiver 2000 2 24-06-2002 00:14
MnM EASY Question of the Day Winners! Mike Bonham General Forum 22 03-05-2002 21:21
Chief Delphi Site Question Mike Bonham General Forum 1 16-02-2002 22:18
Rookie Programmer has question about the default code DanL Programming 3 26-01-2002 19:59


All times are GMT -5. The time now is 09:24.

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