Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Can You help us??? (programming questions) (http://www.chiefdelphi.com/forums/showthread.php?t=25983)

HuskieRobotics 24-02-2004 20:27

Can You help us???
 
We would like to know a few things. First, Are there any default variables that we can use?? if so what are they?? Second, Where are all of the variables for the program defined??? Thanks!!

jacob_dilles 24-02-2004 21:19

Re: Can You help us???
 
besides the control variables ( that should only change loop-to-loop ) first has not made you any variables. you put any variables you want in the user_routines.c file in the section right under where it sais
Code:

/*** DEFINE USER VARIABLES AND INITIALIZE THEM HERE ***/
/* EXAMPLES: (see MPLAB C18 User's Guide, p.9 for all types)
unsigned char wheel_revolutions = 0; (can vary from 0 to 255)
unsigned int  delay_count = 7;      (can vary from 0 to 65,535)
int          angle_deviation = 142; (can vary from -32,768 to 32,767)
unsigned long very_big_counter = 0;  (can vary from 0 to 4,294,967,295)
*/

and if you wana get realy fancy ( which i dont think, from this post, you are too intrested in ) you can go into the user_routiens.h file and do typedefs... etc but if you wana declare a counter variable, say, you would simply put
Code:

unsigned counter1 = 0;
and there ya go. simple eh? theres a bunch of variable types, im not even gonna start goin there. good luck guys


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

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