From: "@{-_-}@" <nuhvok@terra.es>
Subject: whats semicolon?
Date: Thu, 23 Oct 2003 20:47:35 GMT
Date: 2003-10-23T20:47:35+00:00 [thread overview]
Message-ID: <3F983E65.2080407@terra.es> (raw)
Im triying to develop a code in ADA. Im a newbie :). This code must
ouput a series number.
If I try a number N lagger than nought the program must ouput a
progressive series number from 1 as far as N.
If I try a number N smaller than nought, the program must output a
progressive series number from -1 as far as N.
If I try nouth the program must output "ZERO".
I tried the following intructions:
with Text_Io, Ada.Integer_Text_IO;
use Text_Io, Ada.Integer_Text_IO;
procedure Practica1 is
n: integer;
c: integer :=0;
begin
put ("Escribe un numero entero: ");
get (n);
if n = 0 then
put("cero")
else
IF N > 0 then
for c in 0..n loop
put (c);
end loop
else
for c in -1..n loop
put (c);
end loop
end if
end if
end Practica1;
When I try to compile it, the objectada show the following error:
practica1.adb: Error: line 20 col 2 Parse error: expected SEMICOLON, got
ELSE, Inserting SEMICOLON
Whats SEMICOLON?
Thx to community!!
gretting2all!!!
next reply other threads:[~2003-10-23 20:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-23 20:47 @{-_-}@ [this message]
2003-10-23 21:33 ` whats semicolon? Simon Wright
2003-10-23 23:32 ` Ludovic Brenta
2003-10-23 23:56 ` Martin Dowie
2003-10-24 1:19 ` Jeffrey Carter
2003-10-24 13:28 ` Preben Randhol
2003-10-24 14:34 ` Martin Dowie
2003-10-24 15:10 ` Preben Randhol
2003-10-24 17:20 ` Martin Dowie
[not found] ` <n2mm61-fg3.ln1@beastie.ix.netcom.com>
2003-10-24 20:06 ` Simon Wright
2003-10-25 13:39 ` Roberto Waltman
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox