# Revision history [back]

### Why does environ return some variables and not others

I have an issue with LO whereby the environ function will return some values like PATH, but not others like OSTYPE and MACHTYPE. I tried to use GetGUIType() to determine which operating system I am running so I can run the appropriate e-mail code, but it retruned OSX although I am running on a Linux system! As much as I'd like to be able to afford a Mac, this is clearly incorrect, so I have tried to roll my own function based on interpreting certain environment variables.

In a command windows I can see these: MACHTYPE=x86_64-pc-linux-gnu OSTYPE=linux-gnu

However, the environ function seems to be very selective about the variables is returns and does not return these although it does return others.

### Why does environ return some variables and not others

I have an issue with LO whereby the environ function will return some values like PATH, but not others like OSTYPE and MACHTYPE. I tried to use GetGUIType() to determine which operating system I am running so I can run the appropriate e-mail code, but it retruned OSX returned 3 (MAC) although I am running on a Linux system! As much as I'd like to be able to afford a Mac, this is clearly incorrect, so I have tried to roll my own function based on interpreting certain environment variables.

In a command windows I can see these: MACHTYPE=x86_64-pc-linux-gnu OSTYPE=linux-gnu

However, the environ function seems to be very selective about the variables is returns and does not return these although it does return others.

### Why does environ return some variables and not others

I have an issue with LO whereby the environ function will return some values like PATH, but not others like OSTYPE and MACHTYPE. I tried to use GetGUIType() to determine which operating system I am running so I can run the appropriate e-mail code, but it returned 3 (MAC) although I am running on a Linux system! As much as I'd like to be able to afford a Mac, this is clearly incorrect, so I have tried to roll my own function based on interpreting certain environment variables.

In a command windows I can see these: these:

MACHTYPE=x86_64-pc-linux-gnu
OSTYPE=linux-gnuOSTYPE=linux-gnu


However, the environ function seems to be very selective about the variables is returns and does not return these although it does return others.

### Why does environ return some variables and not others

I have an issue with LO whereby the environ function will return some values like PATH, but not others like OSTYPE and MACHTYPE. I tried to use GetGUIType() to determine which operating system I am running so I can run the appropriate e-mail code, but it returned 3 (MAC) although I am running on a Linux system! As much as I'd like to be able to afford a Mac, this is clearly incorrect, so I have tried to roll my own function based on interpreting certain environment variables.

In a command windows I can see these:

MACHTYPE=x86_64-pc-linux-gnu
OSTYPE=linux-gnu


However, the environ function seems to be very selective about the which variables is it returns values for and does not return returns a null string for these although it does return others.correctly returns the values of other environment variables.