From: jm59@prism.gatech.edu (John M. Mills)
Subject: Embedding Text Data in Source (Was Re: String to Integer)
Date: 1997/07/17
Date: 1997-07-17T00:00:00+00:00 [thread overview]
Message-ID: <5ql62v$8dp@acmey.gatech.edu> (raw)
In-Reply-To: dewar.869066339@merv
I have a question which diverges slightly from the original topic, but is
somewhat related. Please redirect me to "Read The Fine Manual" if that
is appropriate, but be specific if you can.
I now provide object parameters for a program in the form of a number of small
files whose names are passed to the <ObjectType1>.Create(ParamFileName1, ...)
procedures for each of the objects in my model. This works fine. I would
also like to have a set of default parameters compiled into the code. Hard-
coding this would be simple, but I want instead to include as the default
a specified file from my source tree, verbatim, then use the same parsing
routines to process either the file image embedded in the code or one read
under a file name, as transparently as possible using approaches similar to
the earlier suggestions in this thread: String'Value( ParamStr ) ... etc.
The present form of my parameter files is similar to this:
! comment description
VersionIDString ! string to match for error checking
! comment lines as desired
RealValueString ! parameter value
! descriptive comment(s)
IntegerValueString ! parameter value
EnumValueString ! and so forth, with '*ValueString's in fixed order
...
There is no guarantee that a line will have a specific length, but the
sequence and grouping of parameters by [non-comment] line is well-defined.
THE QUESTION:
How can I embed those files' contents in my code automatically at compilation
so they can be parsed as strings?
Hope I managed to explain that .. &:^P I am using GNAT on a variety of
UNIX platforms.
Thanks -- john mills --
--
John M. Mills, Senior Research Engineer -- john.m.mills@gtri.gatech.edu
Georgia Tech Research Institute, Georgia Tech, Atlanta, GA 30332-0834
Phone contacts: 404.894.0151 (voice), 404.894.6258 (FAX)
"The 'Quick and Dirty' approach can generally be relied on to be dirty."-RlF
next prev parent reply other threads:[~1997-07-17 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-15 0:00 String to Integer Charles Hill
1997-07-15 0:00 ` John Herro
1997-07-16 0:00 ` Robert Dewar
1997-07-17 0:00 ` John M. Mills [this message]
1997-07-17 0:00 ` Embedding Text Data in Source (Was Re: String to Integer) Samuel T. Harris
1997-07-19 0:00 ` Matthew Heaney
1997-07-16 0:00 ` String to Integer Samuel Mize
1997-07-16 0:00 ` Martin C. Carlisle
1997-07-17 0:00 ` Michael F Brenner
[not found] ` <5qlrue$3ft@top.mitre.org>
1997-07-18 0:00 ` Samuel Mize
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox