SearchWiki:

Main.SideBar (edit)

PmWiki

pmwiki.org

Recent Changes Printable View Page History Edit Page

sichtbarkeit von variable x in procedure foo

 with adalogo;
 use adalogo;

 procedure NONAME is

  x:integer:=0;

  procedure moo is
    x:integer:=0;
  begin
    put_line("moo1");
    x:=7;
    foo;
    x:=12;
    put_line("moo2");
  end;

  procedure foo is
  begin
    x:=15;
  end;


 begin

  x:=3;
  moo;
  put_line(x);
  x:=4;
  put_line(x);

 end;


 procedure bla is

  type arr is array(integer range <>) of integer;

  moo:arr(1..10):=(others=>5);
  foo:arr(3..6):=(others=>0);

 begin

  foo(4..5):=moo(6..7);
  put(foo(3));
  put(foo(4));
  put(foo(5));
  put(foo(6));

 end bla;


 procedure bla is

  --type mod gibt zyklische datentyp
  type foo is mod 8;
  a : foo;

 begin

  a := 6;
  a := a + 3; -- 6+3 = 9 mod 8 = 1
  if a > 1 then
    put(".");
  end if;

 end bla;

Edit Page - Page History - Printable View - Recent Changes - WikiHelp - SearchWiki
Page last modified on December 14, 2008, at 04:27 PM