Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,019 of 2,978    |
|    dh8000 to All    |
|    Re: Variables    |
|    20 Jan 06 19:16:50    |
   
   From: dennishartvigsen@ofir.dk   
      
   "Marco van de Voort" skrev i en meddelelse   
   news:slrndt29rn.lub.marcov@snail.stack.nl...   
   > On 2006-01-20, Michael Sørensen wrote:   
   >>   
   >> But I need some more informations.   
   >>   
   >> I make an example: ;o)   
   >>   
   >   
   > Var:   
   > SubResult: integer;   
   >   
   >> Procedure subCalculate;   
   >   
   >> Begin   
   >> some code which ends with   
   >> SubResult:= xxx (a number)   
   >> End;   
   >>   
   >> Procedure Calculate;   
   >> Var   
   >> Result:: integer;   
   >> Begin   
   >> In this procedure i want to use the variable "SubResult" fron the   
   >> procedure   
   >> subCalculate like this.   
   >> Result:= SubResult + 1;   
   >> End;   
   >   
   > Now subresult doesn't "belong" to a procedure anymore, but is for the   
   > whole   
   > .pas file (main program or unit)   
      
   Yes but can't i make it so the variable subresult only belong to Procedure   
   SubCalculate and Procedure Calculate AND not to the rest of the unit.   
      
   It's because I have a unit with a lot of calculates. And this subResult   
   should only uses in few procedures and another subResult should uses in   
   another few procedures ans so on.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca