Dear M4 support person,

My name is Jan Jansen and I supply my full contact details below with this 
E-mail. As in the header of this E-mail indicated, I would like to report a 
problem that I have, not a bug because the documentation does not state that it 
should work, although I thought (wrongly?) that it would. In the manual you ask 
for the version number of my rather old M4:
   $ m4 --version
   m4 (GNU M4) 1.4.17
   Packaged by Cygwin (1.4.17-1)
   Copyright (C) 2013 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>.
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   Written by Rene' Seindal.

Please find attached to this E-mail the M4 source file, TestIfelseDefine.m4, 
that is completely documented and should explain itself. The idea is to make a 
define() or perhaps better redefine command dependent on some condition and use 
an ifelse(...,...,define(),define()) statement for that and demonstrate and 
document that it works. As the conditions became more complex, I decided to use 
a ifelse(...,...,ifelse(...,...,define())) statement for that and it did not 
work. I am surprised that it did not work but found in the manual no statement 
that it should work. I have tested with text without define() that the 
statement works and I have provided a work-around. This means that M4 is still 
usable if the double ifelse define statement is not supported, although the 
final program looks worse and is less easy to support. My question too you is, 
am I miss using M4, it is trying to use it for something that it is not 
supposed to do? As for as I know the C-preprocessor allows such constructs, 
even deeply nested and therefore I assumed M4 would do that too. My other 
question is, why does M4 supported it as ifelse define combination but not the 
more deeply nested ifelse ifelse define combination? I would have expected that 
if the first works the others would be done by the M4-program nearly 
automatically. My last question is, do you consider my supplied M4 source files 
as being portable? I use the same program on a lot of different machines and I 
would like the output to be the same on all those machines. I program and test 
my M4 source code on my office PC but the actual program runs on a production 
PC-Cluster.

As you can read, I am using the M4 program with a lot of pleasure and I am 
enjoying that it is wide availability in the UNIX world. I use it for one of my 
projects intensively and it makes my work a lot easier. I would like to thank 
you for that. I also would like to thank you for all the time you spend in 
answering my questions. I hope that this E-mail can make M4 a better program or 
that my knowledge of M4 can be increased.

With best regards,
Jan


Dr. Jan T.M. Jansen
Medical Dosimetry Group
Radiation Dosimetry Department
Centre for Radiation, Chemical and Environmental Hazards
Public Health England
Chilton, Didcot
Oxon, OX11 0RQ, UK
Tel: +44 (0) 1235 825017
Fax: +44 (0) 1235 834925
E-mail: jan.jan...@phe.gov.uk<mailto:jan.jan...@phe.gov.uk>
Website: http://www.gov.uk/phe


**************************************************************************
The information contained in the EMail and any attachments is confidential and 
intended solely and for the attention and use of the named addressee(s). It may 
not be disclosed to any other person without the express authority of Public 
Health England, or the intended recipient, or both. If you are not the intended 
recipient, you must not disclose, copy, distribute or retain this message or 
any part of it. This footnote also confirms that this EMail has been swept for 
computer viruses by Symantec.Cloud, but please re-sweep any attachments before 
opening or saving. http://www.gov.uk/PHE
**************************************************************************

Attachment: TestIfelseDefine.m4
Description: TestIfelseDefine.m4

Reply via email to