comp.lang.ada
 help / color / mirror / Atom feed
From: Cecilia Chew <cecilia@nowhere.com>
Subject: Problem from a Newbie
Date: Tue, 13 Jan 2004 16:44:15 +0800
Date: 2004-01-13T16:44:15+08:00	[thread overview]
Message-ID: <4003b00c_2@news.tm.net.my> (raw)

Hello All,
I'm a newbie in Ada. There are a lot of question mark in my mind. I'm 
now doing a simple program and the desired output is a signal wave as below.

*      **      **      *
  *    *  *    *  *    *
   *  *    *  *    *  *
    **      **      **
And the coding that i have done is as follow.

with Ada.Text_Io, Ada.Float_Text_IO;
use Ada.Text_Io, Ada.Float_Text_IO;

procedure Graph1 is
    Y : Integer;
    Max_Point : Float;
    Min_Point : Float;
    Pi : Constant := 3.142;
begin

    Max_Point := 1.0;
    for X in 0 .. 360 loop
       for r in 0.0 .. Max_Point loop
          Y := sin (X * 2 * Pi/360);
          Put ("*");
       end loop;
    end loop;
end Graph1;

Could someone tell me what are the mistakes in the coding? Error message 
from the compiler is the 'sin' is undefined. what should i do with this?


-- 
Cecilia Chew
c e c i l i a <AT> g r e e n l i m e . c o m



             reply	other threads:[~2004-01-13  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13  8:44 Cecilia Chew [this message]
2004-01-13 12:37 ` Problem from a Newbie David C. Hoos
2004-01-13 17:42 ` Jeffrey Carter
2004-01-14  5:49 ` Steve
2004-01-14 21:08   ` Simon Wright
     [not found] ` <kc8fd1-ul5.ln1@beastie.ix.netcom.com>
2004-01-14 16:42   ` Jean-Pierre Rosen
2004-01-15  8:56     ` Dmitry A. Kazakov
2004-01-14 17:41   ` Jeffrey Carter
2004-01-15  1:03     ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox