[Gambas-user] User environment interrogation

Bruce adamnt42 at gmail.com
Fri Feb 8 08:58:24 CET 2019


Ah Fabien! I just knew it had to be somewhere. (Damned if I know how I 
couldn't find it :-( Age, eyesight, stupidity, possibly all three.
tx
B

On 8/2/19 6:17 pm, Fabien Bodard wrote:
> It is here :-)
> 
> http://gambaswiki.org/wiki/comp/gb/application/env
> 
> Le ven. 8 févr. 2019 à 07:51, Bruce <adamnt42 at gmail.com> a écrit :
>>
>> On 8/2/19 4:59 pm, T Lee Davidson wrote:
>>> On 2/8/19 12:12 AM, Bruce wrote:
>>>> (Quicky?) Is there an easy way to get a particular environment setting
>>>> for the current user.
>>>> IOW I want to get the result of (say)
>>>>     echo $LD_LIBRARY_PATH
>>>>
>>>> tia
>>>> Bruce
>>>
>>> I have to think that I must be missing something, because this should be
>>> quite easy.
>>>
>>> Public Sub Main()
>>>
>>>     Dim sOutput As String
>>>
>>>     Shell "echo $LD_LIBRARY_PATH" To sOutput
>>>     Print sOutput
>>>
>>> End
>>>
>>>
>>> ___
>>> Lee
>>>
>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>> Missing something? I think not, but my usual over simplification :-)
>>
>> Trying again.
>>
>> Does there exist in the gambas native libraries a way to interrogate the
>> current user's environment for any arbitrary setting?
>>
>> I was looking for an answer to see if I was missing something in my
>> understanding of the User, System, Application etc classes that may save
>> me the effort of doing exactly what you said.
>>
>> What I am really trying to do is something like this:
>>
>>     If User.Env["ZZ_ABSOLUTE_RUBBISH"] then
>>       DoSomething_ProperLike
>>     Else
>>       Message.Error("blah,blah, blah. Die you Moron!")
>>       Return 300KV_through_keyboard
>>     Endif
>>
>> I guess I'll have to write it myself.
>>
>> cheers
>> B
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 
> 
> 


More information about the User mailing list