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
getenv - fetch the contents of a system environment variable
Calling Sequence
getenv(name)
getenv(regentry,registry) (Windows only)
Parameters
name
-
the name of the environment variable to fetch
regentry
a list of three strings, the registry key, the value path and value name
Description
Looks up the specified system environment variable and returns its value as a Maple string. If the specified variable is not defined, getenv will return NULL.
A system environment variable is one that is set in the shell from which Maple was invoked. For example, under the UNIX C Shell, such variables are assigned using the setenv command. Under MS-DOS, such variables are assigned using the set command.
The set of available environment variables, and their meanings, is operating system dependent. Maple procedures or worksheets that make use of the getenv function will not likely be portable between versions of Maple for different operating systems.
Note: Issuing a shell command (via Maple's system function) to set the value of an environment variable will not be reflected in subsequent calls to getenv. This is because the system function spawns a sub-shell, and changes to a sub-shell's environment will not affect the shell from which Maple was invoked.
In the Windows versions of Maple, getenv can also be used to query values from the Windows registry. In this case, the first argument is a list of three strings, the registry key ("HKEY_LOCAL_MACHINE", "HKEY_CURRENT_USER", etc ), the value's path and the value's name and the second argument is the name registry.
Examples
This is only valid on a Windows system
See Also
system
Download Help Document