Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Maplets[Tools][Get] - 起動中の maplet からの、要素オプションの値の取得
使い方
Get(objs, opts)
Get(handle, objs, opts)
パラメータ
objs - 取得を行いたいオブジェクト
opts - option=value の形の等式; ここで option は corrections または update のいずれか; maplet から要素オプションの値を取得するためのオプション指定
handle - maplet の識別子
説明
Get(obj, opts) および Get(handle, obj, opts) コマンドは、起動中の maplet から、指定された要素のオプションの値を取得します。Get を使用することが可能な要素オプションを特定するためには、個々の Element のヘルプページを参照するか、もしくは Maplets/ElementOptions を参照して下さい。
Get の使用は、(ライブラリの手続きを含む)手続き内に限定されます。Get は、maplet の定義の中では使用できません。
handle が提供されていない場合には、Evaluate コマンド要素の実行により呼び出される手続き内で Get を 使用しなくてはなりません。変数 thismaplet が、maplet の呼び出しを指定するために使用可能です。
objs 内の各オブジェクトは、以下に示す形式のいずれかでなくてはなりません。ここで、ref は maplet 内にある要素への参照、opt は参照される要素に関するオプションを示す記号、typ は指定された値で求められる型、そして reference は取得される値が maplet 内にある他の要素への参照であることを示します。
ref ref(opt) ref::typ ref(opt)::typ ref(opt)::reference
オプション opt が指定されていない場合には、value オプションが取得されます。
型 typ が指定されている場合、そのオブジェクトは分析されます。すなわち、ダブルクォーテーションは、文字列から取り除かれます。例えば、"1" を分析した値は 1 となります。オブジェクトを分析しない場合には、エラーが起こります。オブジェクトの分析を行っても、その型が型 typ ではない場合には、エラーが起こります。それ以外の場合では、オプション opt の分析された値が返されます。
opts 引数は、Get のオプションを定義する、1つまたは複数の以下の等式を含みます。
corrections = true または false
このオプションが true に設定され、そして型を関連付けられた項目について、分析に失敗する、あるいは適切な型にすることに失敗すると、ユーザにそれを正すように促す入力ダイアログが表示されます。デフォルトの値は、false です。
update = true または false
このオプションが true に設定されると、手続き内のオプション値に関する変更は、maplet 内の要素オプションへコピーされます。デフォルトの値は、false です。
例
入力フィールドの内容として次の値を用いて、この例題を試してみて下さい; 'x', '[x]' および 'x y' 。後ろ2つの入力では、maplet がエラーを返します。
MyProc := proc() local integrand; int(Maplets:-Tools:-Get('TF1'::algebraic, corrections), x); end proc: with(Maplets[Elements]): maplet1 := Maplet([TextField['TF1'](), [ Button("Integrate w.r.t. x", Evaluate('TF1' = "MyProc")), Button("OK", Shutdown(['TF1'])) ]]): Maplets[Display](maplet1);
以下に示す '[x]' および 'x y'を用いた maplet で表示されるエラーメッセージを、比較してみて下さい。
maplet2 := Maplet([TextField['TF1'](), [ Button("Integrate w.r.t. x", Evaluate('TF1' = 'int(TF1, x)')), Button("OK", Shutdown(['TF1'])) ]]): Maplets[Display](maplet2);
エラーメッセージが以下のものと似ていることに注意して下さい:
int([x], x);
Error, (in int) wrong number (or type) of arguments
int(x y, x);
on line 131, syntax error, missing operator or `;`: int(x y, x); ^
参照
int, Maplets パッケージの概要, Maplets[Display], Maplets/ElementOptions, Maplets[Elements] パッケージの紹介, Maplets[Elements][Button], Maplets[Elements][Evaluate], Maplets[Elements][Shutdown], Maplets[Elements][TextField], Maplets[Examples][GetInput], Maplets[Tools] パッケージの紹介, Maplets[Tools][Set], 手続き, type
Download Help Document