473,413 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

__FILE__ + __DATE__

Hello all,

is it possible to change the format of __FILE__ + __DATE__,
for example instead of hh:mm:ss ss:mm:hh?

Where can I get information on this topic?

Dec 3 '07 #1
1 2064
On Mon, 3 Dec 2007 05:16:13 -0800 (PST), Zero <ch********@web.de>
wrote:
is it possible to change the format of __FILE__ + __DATE__,
for example instead of hh:mm:ss ss:mm:hh?
Not in (standard) C, but <OTfor make (and perhaps some other build
systems) on some systems you can do something like:
c89 -DMYDATE=`date +%blahbah` otherflagsandfiles

Filenames are somewhat harder in general because essentially all
nontrivial translation units will involve more than one source file.
Also on non-Unix systems there is variation in the preferred and even
allowed syntaxes of filenames/pathnames/etc. You may have to punt on
these issues, or at least limit your supported platforms.

But if what you want is some component and/or version identifier(s)
that are different from the standard ones, just make your own.

- formerly david.thompson1 || achar(64) || worldnet.att.net
Dec 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Pomasl | last post by:
We picked up a helpdesk script from sourceforge, Mantis. This script uses the __FILE__ magic constant to ostensibly derive the path to the include directory from a script in the top level...
1
by: Chris Pomasl | last post by:
Does no one have any insight?......please? Chris -------- Original Message -------- Subject: Problem with __FILE__ magic constant Date: Tue, 06 Jan 2004 16:43:41 GMT From: Chris Pomasl...
5
by: Ben Hetland | last post by:
I want something like content of __DATE__ compiled into my binary. (Being the date of compilation that is important.) However, I'd like the compiled-in string to be in the ISO standard format...
7
by: Erik Cato | last post by:
Hi group! Anyone know a way to convert the __DATE__ predefined macro into a unsigned int representing the current date? It should be possible to make out what date it was from the beginning. My...
2
by: Christopher Benson-Manica | last post by:
Recently a great example of converting __DATE__ into an integer via preprocessor tricks was posted. I've been trying to accomplish something similar - convert __DATE__ into a string in the format...
5
by: jake1138 | last post by:
I couldn't find an example of this anywhere so I post it in the hope that someone finds it useful. I believe this is compiler specific (I'm using gcc), as C99 defines __VA_ARGS__. Comments are...
2
by: Jeffrey Bradshaw | last post by:
Are there compile date/time and file line equivalents for __DATE__ and __FILE__ in C#?
18
by: Lukas Ruf | last post by:
Dear all, for debugging purposes, I like the pre-compiler macros __FILE__, __FUNCTION__, __LINE__ I have been wondering if there is a short form of __FILE__ that provides only the filename...
4
by: 7stud | last post by:
Hi, I'm having trouble understanding what the definition of __file__ is. With this program: ------ #data.py: def show(): print __file__
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.