Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <001301c30a85$bc881970$78d96f83@pomello> From: "Max Bowsher" To: "Suetlam Chung" , "cygwin cygwin" References: <20030424171421 DOT 5586 DOT qmail AT web10104 DOT mail DOT yahoo DOT com> Subject: Re: parse error help Date: Thu, 24 Apr 2003 18:20:00 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Suetlam Chung wrote: > Hi guys, > > I am compiling the following program under > cygwin\usr\bin (my OS is Win2K) but it shows that > +++++++++++++++++++++++++++++++++++++++++ > sample.c: In function `main': > sample.c:19: parse error before "double" > ++++++++++++++++++++++++++++++++++++++++++ > > my program is on below and my program is > intend to returns a positive double prescision > floating point number uniformly distrbute in the range > (0,1) excluding both 0.0 and 1. > > +++++++++++++++++++++++++++++++++++++++++++ > #include > #include > #include > #include > > int > > main (void) > { > const gsl_rng_type * T; > gsl_rng * r; > int i, n =10; > double mu = 3.0; > gsl_rng_env_setup(); > T = gsl_rng_default; > r = gsl_rng_alloc (T); > for (i=0; i { > unsigned int k = double gsl_rng_uniform_pos (const ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Huh? This line isn't valid C, and I can't work out what you are trying to do. Or, more succinctly: "Parse error"! Max. > gsl_rng*r); > printf(" %u", k); > } > printf("\n"); > return 0; > } > +++++++++++++++++++++++++++++++++++++++++ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/