hi
it must be me struggling with terminoligy or the question.
In pascal a variable has to be defined/declared before you use it, or it will not compile.
If you have declard a variable and not used it,you get a hint message variable not defined.
If you declare and assign a variable but do not use it you get hint message variable assigned but not used.
Always check the compiler hints,and fix as many as you can, quite often it will fix a problemyou havent thought of.
if you coming from basic, variable are defined on creation/use. most dialects would also set the default values.
ie
10 for i%=1 to10:print i%:next i%
this defines i% as an integer on its use,in pascal you need to define it first
program tst;
var i:integer;
begin
for i:=1 to 10 do writeln(i);
end.
basic to define a string you could use
pascal you need to difine it and then set its value
var s:string;
begin
s:='';
in later dialects this can be done in its definition
Its the job of the programmer to set the initial state of variables before you use them.
most of my old code,initializes the variables in the same order as they are defined,it makes for simpler debugging, i have been burnt many times assuming a default value is assigned on declaration. So always initialize before use.
I have probably not got the question though, so please give specifics