> drive:char; > driveletter :string[4]; > > begin > for drive:='A' to 'Z' do > begin > driveletter:=drive+':\'; > end; > end; > > > the return drive value is always Z:\ your loop changes the value of driveletter 26 times (the first 25 times overwriting the old value). after the 26th and final iteration what is left in driveletter is the last thing you put there. As written, that will be 'Z:\'. this is correct behaviour, but probably not what you intend. [or maybe i'm missing the whole point of this thread] -ns --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
- [DUG]: drive path extraction abaddon
- RE: [DUG]: drive path extraction Steve Aish
- Re: [DUG]: drive path extraction abaddon
- Re: [DUG]: drive path extraction abaddon
- RE: [DUG]: drive path extraction Patrick Dunford
- Re: [DUG]: drive path extraction abaddon
- RE: [DUG]: drive path extraction Patrick Dunford
- Re: [DUG]: drive path extraction Nello Sestini
- Re: [DUG]: drive path extraction abaddon
- Re: [DUG]: drive path extraction Nello Sestini
- Re: [DUG]: drive path extraction abaddon
- Re: [DUG]: drive path extraction Nello Sestini
- Re: [DUG]: drive path extraction abaddon
- Re: [DUG]: drive path extraction Nello Sestini
- Re: [DUG]: drive path extraction abaddon
- Re: [DUG]: drive path extraction Nello Sestini
- Re: [DUG]: drive path extraction abaddon
- RE: [DUG]: drive path extraction David O'Brien
- RE: [DUG]: drive path extraction Ross Levis
- Re: [DUG]: drive path extraction Dave