Re: [fpc-pascal]building a command string

2003-09-24 Thread DONALD PEDDER
> The plus concatenates strings, Okay, I see. > Basically you can always do this: > Writeln('Hello, ' + 'world!'); > Writeln('Hello, ', 'world!'); > and they do the same thing. I don't think I've ever seen the former. This is useful stuff to know! :-) > P.S. find a good book about p

Re: [fpc-pascal]building a command string

2003-09-24 Thread Nikolay Nikolov
DONALD PEDDER wrote: Exec(GetEnv('COMSPEC'), '/c copy '+ParamStr(1)+' '+ParamStr(1)+'.bak /v'); Now THIS is what I needed to know! Thank you. :-) I originally tried a writeln kind of syntax - '/c copy ',paramstr(1),' ',paramstr(1),'.bak /v' - but that didn't work, hence my other attempts to

Re: [fpc-pascal]building a command string

2003-09-23 Thread DONALD PEDDER
> Exec(GetEnv('COMSPEC'), '/c copy '+ParamStr(1)+' '+ParamStr(1)+'.bak /v'); Now THIS is what I needed to know! Thank you. :-) I originally tried a writeln kind of syntax - '/c copy ',paramstr(1),' ',paramstr(1),'.bak /v' - but that didn't work, hence my other attempts to build the string. I di

Re: [fpc-pascal]building a command string

2003-09-23 Thread Nikolay Nikolov
DONALD PEDDER wrote: Below is the current state of my code. I am getting "invalid TSS" at the point I have noted. I don't even know what a "TSS" is! I guess it's something to do with strings (I haven't used strings much before either - something else lacking in my previous compilers). I searched

[fpc-pascal]building a command string

2003-09-22 Thread DONALD PEDDER
Hi all, The previous compiler I used didn't have Exec or a way to get parameters, so I am currently fooling around with these new toys (needless to say, my old programs were pretty inflexible, with hard-coded filenames, etc.). In particular, I am trying to build and execute a DOS command usi