Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
モジュールにおける大域変数
使い方
global glo1, glo2, ...;
パラメータ
glo1, glo2, ... - 1 個以上の大域変数名
説明
モジュールの定義は1個以上の大域変数の宣言を含んでいても構いません。手続きにおける大域変数と同様です。それぞれの式 gloi(i=1,2,...) は symbol である必要があります。
モジュール定義中の任意の場所で行われた大域変数の(代入による)変更は、その変更を実行した以降においては、大域的な影響を及ぼすことになります。モジュールの本体は、そのモジュール定義が評価された時(実装中)に実行されますが、(外部)手続きの本体はそれが呼ばれた時に実行されるということを注意しておきます。
ある変数を、そのモジュールにおける大域変数であると宣言すると、暗黙の通用規則によってそれを暗黙の局所変数だと解釈することが無くなります。暗黙の通用規則によって、暗黙の局所変数として扱われることが無いとしても、大域変数は常に厳格に宣言すべきものなのです。
参照
module, module[export], module[local], procedure
Download Help Document