comp.lang.ada
 help / color / mirror / Atom feed
* whats semicolon?
@ 2003-10-23 20:47 @{-_-}@
  2003-10-23 21:33 ` Simon Wright
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: @{-_-}@ @ 2003-10-23 20:47 UTC (permalink / 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!!!




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-10-25 13:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-23 20:47 whats semicolon? @{-_-}@
2003-10-23 21:33 ` 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

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