comp.lang.ada
 help / color / mirror / Atom feed
* Can AdaMULTI preprocessor directives be defined with the GUI?
@ 2019-06-11 16:19 JudySmith@gmail.com
  2019-06-11 16:34 ` Shark8
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: JudySmith@gmail.com @ 2019-06-11 16:19 UTC (permalink / raw)


Hello,

Is it possible to define a preprocessor directive variable using something like the AdaMULTI GUI interface itself instead of defining a variable within the code?

I.E.: Can I define the following using the GUI itself or some other way without defining the variable within the Ada code? Do I have more than one option? What's the best way to do it?

#if DAYSOFOURLIVES'DEFINED then

--...
#end if;

Thank you,
Doris


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can AdaMULTI preprocessor directives be defined with the GUI?
  2019-06-11 16:19 Can AdaMULTI preprocessor directives be defined with the GUI? JudySmith@gmail.com
@ 2019-06-11 16:34 ` Shark8
  2019-06-11 16:36 ` Jeffrey R. Carter
  2019-06-12  8:31 ` R R
  2 siblings, 0 replies; 5+ messages in thread
From: Shark8 @ 2019-06-11 16:34 UTC (permalink / raw)


On Tuesday, June 11, 2019 at 10:19:20 AM UTC-6, Judy...@gmail.com wrote:
> Hello,
> 
> Is it possible to define a preprocessor directive variable using something like the AdaMULTI GUI interface itself instead of defining a variable within the code?
> 
> I.E.: Can I define the following using the GUI itself or some other way without defining the variable within the Ada code? Do I have more than one option? What's the best way to do it?
> 
> #if DAYSOFOURLIVES'DEFINED then
> 
> --...
> #end if;

Ada has no preprocessor; this was a deliberate design-decision.
The way such conditional variance is typically handled is through the tooling/project system. (e.g. by specifying a particular implementation [ADB file] to associate with the corresponding specification for that particular compilation.)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can AdaMULTI preprocessor directives be defined with the GUI?
  2019-06-11 16:19 Can AdaMULTI preprocessor directives be defined with the GUI? JudySmith@gmail.com
  2019-06-11 16:34 ` Shark8
@ 2019-06-11 16:36 ` Jeffrey R. Carter
  2019-06-12  8:31 ` R R
  2 siblings, 0 replies; 5+ messages in thread
From: Jeffrey R. Carter @ 2019-06-11 16:36 UTC (permalink / raw)


On 6/11/19 6:19 PM, JudySmith@gmail.com wrote:
> 
> What's the best way to do it?

The best way is to not use a preprocessor. That's why Ada was designed without one.

-- 
Jeff Carter
"They name the boy Jonathan Ralph Starkwell,
after Virgil's mother."
Take the Money and Run
141


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can AdaMULTI preprocessor directives be defined with the GUI?
  2019-06-11 16:19 Can AdaMULTI preprocessor directives be defined with the GUI? JudySmith@gmail.com
  2019-06-11 16:34 ` Shark8
  2019-06-11 16:36 ` Jeffrey R. Carter
@ 2019-06-12  8:31 ` R R
  2019-06-12 11:21   ` JudySmith@gmail.com
  2 siblings, 1 reply; 5+ messages in thread
From: R R @ 2019-06-12  8:31 UTC (permalink / raw)


On Tuesday, June 11, 2019 at 6:19:20 PM UTC+2, Judy...@gmail.com wrote:
> Hello,
> 
> Is it possible to define a preprocessor directive variable using something like the AdaMULTI GUI interface itself instead of defining a variable within the code?
> 
> I.E.: Can I define the following using the GUI itself or some other way without defining the variable within the Ada code? Do I have more than one option? What's the best way to do it?
> 
> #if DAYSOFOURLIVES'DEFINED then
> 
> --...
> #end if;
> 
> Thank you,
> Doris

I don't know the AdaMULTI environment anymore. It's been decades that I used it and at that time Green Hill didn't support a preprocessor. 

You typically define or set preprocessor variables at the command line (e.g. -XDAYSOFOURLIVES=1000). GNAT uses a configuration file (gpr file) to set some variables. Most probably AdaMULTI IDE has some equivalent means. You have to look it up in your AdaMULTI documentation.

BR
   Rolf


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Can AdaMULTI preprocessor directives be defined with the GUI?
  2019-06-12  8:31 ` R R
@ 2019-06-12 11:21   ` JudySmith@gmail.com
  0 siblings, 0 replies; 5+ messages in thread
From: JudySmith@gmail.com @ 2019-06-12 11:21 UTC (permalink / raw)


On Wednesday, June 12, 2019 at 3:31:06 AM UTC-5, R R wrote:
> You typically define or set preprocessor variables at the command line (e.g. 
> -XDAYSOFOURLIVES=1000). GNAT uses a configuration file (gpr file) to set some 
> variables. Most probably AdaMULTI IDE has some equivalent means. You have to 
> look it up in your AdaMULTI documentation.

There is a configuration file(adabare.mc in the event_analyzer folder) which I don't think is what I want. The Help page says this file defines the following Ada Bare Board objects:

   Task Status
   Event
   Event Category
   Event Overlap

Events are defined in the config file using: 

event:TYPE:SUB_TYPE:EVENT_NAME:BITMAP_NAME:EXTRA_DATA:
     VISIBILITY

   event is a keyword and should be entered exactly as shown above.

   TYPE and SUB_TYPE are two numbers used by the target operating system to identify an event. For example a TYPE of 3 and a SUB_TYPE of 22 corresponds to the tx_thread_create event.

   EVENT_NAME is the event's name as supported by the target operating system.

   BITMAP_NAME is the name of the icon used to represent the event in the EventAnalyzer. Do not include the .bmp file extension.

   EXTRA_DATA specifies additional data that can be useful in understanding an event. For example, if a task is created, the new TaskID can be recorded as extra data for the logged task creation event. Subsequent operations on the task (e.g., running the task) can also log the TaskID so that operations on the same task can be located easily.

There is a "User Guide and Compiler Reference" manual as well as a "Configuring Connections for ARM Targets", and "Debugging."

Thank you,
Doris

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-12 11:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 16:19 Can AdaMULTI preprocessor directives be defined with the GUI? JudySmith@gmail.com
2019-06-11 16:34 ` Shark8
2019-06-11 16:36 ` Jeffrey R. Carter
2019-06-12  8:31 ` R R
2019-06-12 11:21   ` JudySmith@gmail.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox