The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
ids scope
10-14-2016, 07:15 AM
Post: #1
ids scope
I do not understand why dd identifier, can not be called


PHP Code:
local aa:=9// Local external identifier
export bb:=8// Global visible identifier
cc:=7// Global hidden identifier
dir1_fun1( ); // subfunctions
dir1_fun2();

EXPORT main_dir1() // Global main function
BEGIN
  
print(); 
  print(
"aa= " aa); // 9 calls to external local  aa
  
print("bb= " bb); // 8 calls to visible global bb
  
print("cc= " cc); // 7 calls to hidden global bb
  
local aa:=6;        // new scope of aa
  
print("aa= " aa); // 6
  
print("");

  
dir1_fun1(); // 9 5 4 3 2
  
print("");

  print(
"aa= " aa); // 6
  
print("bb= " bb); // 3
  
print("cc= " cc); // 2
 
  //dd:=1; // out of scope ?
  //print("dd= " + dd); 
  
  
dir1_fun2(); 
  
  print(
"ee= " ee); //
  
ee:=-4;
  print(
"ee= " ee); 
END;

export dd:=5// Global visible identifier
dir1_fun1( ) // Local Subfuntion hidden
BEGIN
 
print("aa= " aa); // 9 calls to external local  aa
 
print("dd= " dd); // 5 calls to visible global dd
 
print("-");
 
aa:=4;              // modifies external local aa 9->4
 
print("aa= " aa); // 4
 
bb:=3;              // modifies visible global bb 8->3
 
print("bb= " bb); // 3
 
cc:=2;              // modifies hidden global cc 7->2
 
print("cc= " cc); // 2
END;

export ee:= 0;
export dir1_fun2( ) // Global Subfuntion
BEGIN
  
//export ff:=0; // not valid
  
print("ee= " ee); //
  
ee:=-1;
END

please correct the English commentary
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
ids scope - compsystems - 10-14-2016 07:15 AM
RE: ids scope - cyrille de brébisson - 10-14-2016, 08:08 AM



User(s) browsing this thread: 1 Guest(s)