Главная страница


ru.perl

 
 - RU.PERL ----------------------------------------------------------------------
 From : Dmitry Tweritin                      2:5020/1978.15 30 Oct 2000  21:56:44
 To : Yaroslav Polyakov
 Subject : Re: Вопрос по таблице символов (typeglob)
 -------------------------------------------------------------------------------- 
 
 
  YP> Как правильно обратиться к таблице символов, чтобы получить ссылку на
  YP> переменную, объявленную my?
 
 Hикак, нет ее там. Кусок из 'Advanced Perl Programming':
 
 3.1.1 Lexical Variables
 
 Lexical variables (those tagged with my) aren't listed in the symbol table at
 all. Every block and subroutine gets a list of one or more arrays of variables
 called scratchpads (typically one, but more if the subroutine recurses). Each
 lexical variable is assigned one slot from a scratchpad; in fact, different
 types of variables with the same name - $spud and %spud, say - occupy different 
 slots. Since a subroutine's lexical variables are independent of any other's, we
 get truly local variables. We will have more to say on this subject in Chapter
 20, Perl Internals.
     snaky
 
 ---
  * Origin: Don't worry, the next message will be better. (2:5020/1978.15)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Вопрос по таблице символов (typeglob)   Yaroslav Polyakov   30 Oct 2000 17:41:58 
 Re: Вопрос по таблице символов (typeglob)   Igor L. Bondar   30 Oct 2000 21:28:04 
 Re: Вопрос по таблице символов (typeglob)   Ilya Obshadko   30 Oct 2000 23:57:07 
 Re: Вопрос по таблице символов (typeglob)   Dmitry Tweritin   30 Oct 2000 21:56:44 
Архивное /ru.perl/2789339fdb6db.html, оценка 1 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional