declare variables

Begonnen von shooter, 20. Februar 2011, 19:50:50

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

shooter

i would like to opt for declare variables for some as i see a lot of 0.0 and 1.0 in the lib.
o would like to put them as
zero : real:=0.0;
one : real:=1.0;
hundred :real:=100.0;
etc

inside a function declare them, this to avoid calc errors with int and real all over the place.
or global

the place where is a discussion i would like to have here.
so just vote for local inside a function or function block or global.

hugo

why would you expect calculation errors if we declare the variables differently? using number constants is leading to exactly the same result, while the compiler is doing the job.