Section One BBS

Welcome, Guest.


Subject: FPC snippet. Date: Sat Jan 28 2017 01:19 pm
From: mark lewis To: Nicholas Boel

 On 2017 Jan 27 08:16:22, you wrote to j b l:

 NB> Hello j,

 NB> On Thu Jan 26 2017 19:50:18, j b l wrote to All:

 jl>> I have some FPC code, that isn't working the way it should.

 jl>> if FileExists(fn+'.PK2') then shell('/usr/bin/mv '+fn+'.PK2
 jl>> '+fn+'.MIX');

 NB> Was this a typo? Or should the first instance of "fn" have a "+" before it
 NB> as well?

no, not a typo... read the ""properly formatted""* routine like this


  if FileExists(fn+'.PK2') then
    shell('/usr/bin/mv ' + fn + '.PK2 ' + fn + '.MIX');


the pluses, in this case, are appending strings together...

i'd be interested in what the variable "fn" contains... i'd also be concerned
about that forced caps stuff with ".PK2" which may be lower case on some file
systems which may be case sensitive...



[* NOTE: formatting discussions/disagreements have resulted in some extremely
heated battles.]

)\/(ark

Always Mount a Scratch Monkey
Do you manage your own servers? If you are not running an IDS/IPS yer doin' it
wrong...
... 1 in every 4 Americans has appeared on television.
---
 * Origin:  (1:3634/12.73)

Previous Message       Next Message
In Reply To: FPC snippet. (Nicholas Boel)