Gatomic C 885 Error Syntax Error Before Token
here for a quick overview of the site Help Center Detailed answers parse error before to any questions you might have Meta Discuss the workings syntax error before erlang and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up syntax error before ';' token up vote 0 down vote favorite I wrote a quick program (Calculating wages) to help me stay up to speed. For some reason when I compile this I keep getting the error "53: syntax error before ';' token" #include
int main() { #define week 7; #define year 365; int jan,feb,mar,apr,may,june,july,aug,sep,oct,nov,dec; int wage; /* Upgrade to float in future */ char input,month; int holder; jan=mar=may=july=aug=oct=dec=31; apr=june=sep=nov=30; feb=28; for(;;) { if(input='y') { #define YEAR 366; break; } else if(input='n') { break; } else { printf("Unable to understand input"); } } printf("Enter wage/day in pounds.\n?\n"); scanf("%d",&wage); /* unsure if I need to get string and then use atoi */ printf("Wage per day:\t%d\n",wage); printf("Wage per week:\t%d\n",wage*7); printf("Wage per month:\t%d\n",wage*30); holder=YEAR; printf("Wage per year:\t%d\n",wage*holder); printf("As months have varying day amounts, if you wish to view a specific month type:\n"); printf("A-Jan\nB-Feb\nC-Mar\nD-Apr\nE-May\nF-June\nG-July\nH-Aug\nI-Sep\nJ-Oct\nK-Nov\nL-Dec\nor type X-to EXIT"); month=getchar(); if((month=='A')||(month=='C')||(month=='E')||(month=='G')||(month=='H')||(month=='J')||(month=='L')){ printf("Wage for this month will be:\t%d",wage*31); } else if((month=='D')||(month=='F')||(month=='I')||(month=='K')){ printf("Wage for this month will be:\t%d",wage*30); } else if((month=='B')&&(year==365)){ printf("Wage for this month will be:\t%d",wage*28); } elVisited Search Results View More Blog Recent Blog Posts View More PMs Unread PMs Inbox Send New PM View More Page Extras Menu Forum Themes Elegant Mobile Home » All Forums » [Development Tools] » MPLAB C30 Compiler, ASM30, Link30 forum » Why: syntax error before ')' token ??? Mark Thread UnreadFlat Reading Mode❐ Helpful ReplyWhy: syntax error before ')' token ??? Author Post Essentials Only Full Version BobAGI Super Member Total Posts : 1413 Reward points : 0 Joined: 2011/03/09 00:04:35Location: Texas and Sweden Status: offline 2012/03/04 09:21:31 (permalink) 0 Why: syntax error before ')' token http://stackoverflow.com/questions/20228713/syntax-error-before-token ??? I am writing an application for a PIC24FJ256GB206 cpu using MPLAB-X 1.00 and C30 version 3.30c and now when I try to compile in order to find my mistakes in coding (I have written a lot of code in several files) I get this completely strange error message: ../source/utils.h:10: error: syntax error before ')' token This is the beginning of my utils.h file and the error points http://www.microchip.com/forums/m637990.aspx to the GetTickCount line: #ifndef __UTILS__ #define __UTILS__ UINT32 GetTickCount(); void Delay(UINT32 T); Why in heavens name is there an error report for a ')' char here? I am declaring a function in utils.h to be used in other files as I have been doing for many other such functions. What have I done wrong? -- Bo B Sweden & Texas #1 List Solutions Only 17 Replies Related Threads kalpak Super Member Total Posts : 3265 Reward points : 0 Joined: 2004/03/12 23:01:40Location: India Status: offline Re:Why: syntax error before ')' token ??? 2012/03/04 09:26:19 (permalink) ☄ Helpful 0 This error could also be due to aline left incomplete in the prev file. #2 MBedder Super Member Total Posts : 5978 Reward points : 0 Joined: 2008/05/30 11:24:01Location: Zelenograd, Russia Status: offline Re:Why: syntax error before ')' token ??? 2012/03/04 09:37:18 (permalink) 0 Shouln't the UINT32 be uint32_t and stdint.h being #include'd? How To Ask Questions The Smart Way #3 BobAGI Super Member Total Posts : 1413 Reward points : 0 Joined: 2011/03/09 00:04:35Location: Texas and Sweden Status: offline Re:Why: syntax error before ')' token ??? 2012/03/04 10:11:44 (permalink) 0 This is the start of the file from which utils.
Pages 1 You must login or register to post a reply RSS topic feed Posts: 1 1 Topic by gasya error before 2011-04-27 17:36:54 (edited by gasya 2011-04-27 17:37:42) gasya Member Offline Registered: 2011-04-27 Posts: 2 Topic: Problems with building openwrt Hi!I'm trying to create openwrt custom firmware syntax error before for my DIR-320, and i'm getting something like that:make[8]: Entering directory `/home/gasya/openwrt4/build_dir/target-mipsel_uClibc-0.9.30.1/glib-2.26.1/glib'/bin/bash ../libtool --tag=CC --mode=compile mipsel-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/home/gasya/openwrt4/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/include -I/home/gasya/openwrt4/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/include -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libiconv-stub/include -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libintl-stub/include -DG_DISABLE_SINGLE_INCLUDES -pthread -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libiconv-stub/include -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libintl-stub/include -Wall -MT gatomic.lo -MD -MP -MF .deps/gatomic.Tpo -c -o gatomic.lo gatomic.cOpenWrt-libtool: compile: mipsel-openwrt-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../glib -I../glib -I.. -DG_LOG_DOMAIN=\"GLib\" -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION -DPCRE_STATIC -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/include -I/home/gasya/openwrt4/staging_dir/target-mipsel_uClibc-0.9.30.1/include -I/home/gasya/openwrt4/staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.30.1/usr/include -I/home/gasya/openwrt4/staging_dir/toolchain-mipsel_gcc-3.4.6_uCl