Reading DOS environment variables from c4b 
Author Message
 Reading DOS environment variables from c4b

Hello Friends !
Could  some of you help me ?

I need to read DOS environment variables like "set somevar=somevalue" from a
clarion application .   It's like getenv('somevar') of Foxpro.

Thanks in advance ..

Daniel Sala
Cancun, Mexico



Tue, 22 Jan 2002 03:00:00 GMT  
 Reading DOS environment variables from c4b
Daniel,

From the Icetips KB (keyword: GETENV).  I think this will only work in
16bit.

HTH

Al

!------------------------------------------------------------------------------------------
Here's the code I use to do this.

!!====== Inside the Global map =======
! Declare the C function
      MAP
          MODULE('CLARION INTERNAL STUFF')
              GetEnv(*CSTRING),CSTRING,RAW,NAME('_GETENV')
          END
       END

!! ===== Declare these variables =======
       EnvironCStr     CSTRING(64)
       Rtn:UserID      STRING(64)

!!==== Code where you want it =====
       EnvironCStr = 'UserID'
       Rtn:UserID  = GetEnv(EnvironCStr)



Tue, 22 Jan 2002 03:00:00 GMT  
 Reading DOS environment variables from c4b
Hi Daniel:

There is a complete Class Library in my book _The Clarion Comanion_,
that will allow you to read, write, list, count, etc. DOS Environment
Variables.  You can slice and dice the source code to your own
requirements.

Just a thought...

Quote:

> Hello Friends !
> Could  some of you help me ?

> I need to read DOS environment variables like "set somevar=somevalue" from a
> clarion application .   It's like getenv('somevar') of Foxpro.

> Thanks in advance ..

> Daniel Sala
> Cancun, Mexico

--
 Randy Goodhew
 Thoroughbred Harmonica Co.
 =[oooooooooo]=


Wed, 23 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using dos/windows environment variables in gawk script

2. CW20 and DOS environment variables

3. getting (DOS) environment variables

4. DOS environment variables

5. CW + Dos environment variables

6. DOS Clipper environment variable

7. DOS SET command or set environment variable from Rexx

8. Dos environment variables

9. DOS Environment Variables

10. SET Environment variable in DOS, HOW to?

11. Accessing DOS Environment Variables.

12. Referencing DOS Environment Variables in Fortran

 

 
Powered by phpBB® Forum Software