Recent

Author Topic: aprocess.environment  (Read 931 times)

toby

  • Jr. Member
  • **
  • Posts: 65
Re: aprocess.environment
« Reply #15 on: July 29, 2019, 12:36:51 am »
dude you are being dishonest here

the discussion has alway been about the child process and not about the parent process that is what aprocess.environment does lol

where are you apolgy for you code comment and for the

for i := -100 to (getenvironmentvariablecount - 1) do writeln('getenvironmentstring(', i, ') : ', getenvironmentstring(i));

simplistic use of env?   lol   you are to dishonest to deal with     i was the one saying what you are now saying  and you said it wasn't true


« Last Edit: July 29, 2019, 12:48:44 am by toby »

lucamar

  • Hero Member
  • *****
  • Posts: 2032
Re: aprocess.environment
« Reply #16 on: July 29, 2019, 01:10:42 am »
You get one apology (and a correction) because DOS.EnvStr() effectively starts form one, despite what the documentation says.

For some reason my previous test was giving correct results even for EnvStr(0). In a new even simpler one it just returns an empty string (as do anything other than [1..EnvCount]).

As for this:

the discussion has alway been about the child process and not about the parent process that is what aprocess.environment does lol

That has been exactly my contention all along! It's now clear that we have been talking at cross-purposes. If you had started by saying: "I am running env with a TProcess to check what the passed environment looks like and ..." we would not have wasted so many electrons.

So let's just leave it here, forget the hot words caused by temper and close the discussion, shall we?
« Last Edit: July 29, 2019, 01:12:32 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

toby

  • Jr. Member
  • **
  • Posts: 65
Re: aprocess.environment
« Reply #17 on: July 29, 2019, 01:18:07 am »
okay you have been very very helpful - so thanks  even the 'misunderstanding' has been greatly helpful in exploring things and understanding what is capable with the fpc coding :)


but the only way you can use env is in a tprocess ;)


dsiders

  • Full Member
  • ***
  • Posts: 220
Re: aprocess.environment
« Reply #18 on: July 29, 2019, 01:20:33 am »
okay you have been very very helpful - so thanks  even the 'misunderstanding' has been greatly helpful in exploring things and understanding what is capable with the fpc coding :)


but the only way you can use env is in a tprocess ;)

Try decaf.
Lazarus 2.0.4 / FPC 3.0.4 / Windows 8.1 64-bit

lucamar

  • Hero Member
  • *****
  • Posts: 2032
Re: aprocess.environment
« Reply #19 on: July 29, 2019, 02:02:25 am »
but the only way you can use env is in a tprocess ;)

Or on a terminal. ;D
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

toby

  • Jr. Member
  • **
  • Posts: 65
Re: aprocess.environment
« Reply #20 on: July 29, 2019, 02:31:33 am »

yea but won't help much in working with aprocess.environment

PascalDragon

  • Hero Member
  • *****
  • Posts: 639
  • Compiler Developer
Re: aprocess.environment
« Reply #21 on: July 29, 2019, 09:17:06 am »
You get one apology (and a correction) because DOS.EnvStr() effectively starts form one, despite what the documentation says.
That should probably be reported then... (especially as the example in the documentation starts at 1 ;) )