Tip of the day! import and an annoying syntax error
Jeff Harrison
jeffaharrison at yahoo.com
Mon Dec 10 09:38:27 PST 2007
--- Fairlight <fairlite at fairlite.com> wrote:
> Four score and seven years--eh, screw that!
> At about Mon, Dec 10, 2007 at 07:37:32AM -0700,
> fp at casabellagallery.com blabbed on about:
> > Have you ever written a couple of lines of code
> like:
> > 4 ------- - - - - - - - - -
> - - - - - - -
> > þ If:
> > Then: lookup new = fp_file@ r=free -e
> > 5 ------- - - - - - - - - -
> - - - - - - -
> > þ If:
> > Then: new(1)=ref(1); write new; close new;
> goto LOOP
>
> Missing line 4.5:
>
> If: not new
> Then: ...
>
> mark->
The only time it should fail is when you are out of
disk space - so to be clean I suppose you could have a
customized message to that effect.
What concerns me more is the write and close
statements. Depending on what type of processing this
is, the write may not be necessary. For example if
this was normal input processing or request output -
then it would automatically write when it came to an
"end" statement.
The close makes no sense at all because you are
continually re-opening this file - better to keep it
open until you are done with it.
Good tip though otherwise.
Jeff Harrison
jeffaharrison at yahoo.com
Author of JHExport and JHImport. The fastest and
easiest ways to generate filepro exports and imports.
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
More information about the Filepro-list
mailing list