Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
Options
»
Available macros in code templates
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
SynEdit theme
by
Martin_fr
[
Today
at 08:15:21 am]
Interesting video
by
Joanna
[
Today
at 06:24:53 am]
Single and Double, Conver...
by
ASerge
[
Today
at 05:51:17 am]
IndySecOpenSSL is now ava...
by
TheMouseAUS
[
Today
at 03:49:17 am]
Message CM_ShowingChanged...
by
LeP
[
Today
at 02:13:51 am]
Fast Canvas Library V1.05...
by
Gigatron
[
Today
at 01:48:44 am]
[SOLVED]Program experienc...
by
Cainnech
[
Today
at 12:19:17 am]
TATTabs - how to stop a 3...
by
bobonwhidbey
[
Today
at 12:03:15 am]
New version of LazMapView...
by
wp
[June 12, 2026, 10:56:43 pm]
If FileExists(
by
Bart
[June 12, 2026, 10:39:03 pm]
Which Control should I us...
by
J-G
[June 12, 2026, 08:36:07 pm]
If you are looking for Wi...
by
avra
[June 12, 2026, 07:37:10 pm]
Can /my/ AI help me with ...
by
microxa
[June 12, 2026, 04:26:18 pm]
Lazarus Bugfix Release 4....
by
Martin_fr
[June 12, 2026, 03:57:39 pm]
Testing with 3.2.4 prepar...
by
Martin_fr
[June 12, 2026, 03:50:17 pm]
TDWEdit
by
Ed78z
[June 12, 2026, 10:20:58 am]
Strange Behaviour at Runt...
by
andrew Bubble
[June 12, 2026, 09:54:40 am]
FPC Debug mode releases [...
by
Martin_fr
[June 12, 2026, 09:22:25 am]
Implementing an Elo ratin...
by
paule32
[June 12, 2026, 08:43:20 am]
Death of the Power User
by
wp
[June 12, 2026, 01:29:18 am]
how to add a ForEach call...
by
mas steindorff
[June 11, 2026, 11:42:24 pm]
How to define a type of ...
by
PascalDragon
[June 11, 2026, 09:24:45 pm]
Gitlab site history date.
by
Martin_fr
[June 11, 2026, 08:46:17 pm]
Arkanoid
by
lazarusprogrammer
[June 11, 2026, 08:14:21 pm]
[New Component] ExtTabCtr...
by
d7_2_laz
[June 11, 2026, 05:01:49 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Available macros in code templates (Read 6420 times)
wimpie
New Member
Posts: 32
Available macros in code templates
«
on:
October 28, 2009, 07:40:55 pm »
Hi all
I want to create a code template that will insert the date and the filename upon creation of the template. The date I managed using $Date(). Is there a way to get the file's name?
Logged
Vincent Snijders
Administrator
Hero Member
Posts: 2661
Re: Available macros in code templates
«
Reply #1 on:
October 28, 2009, 08:47:00 pm »
See:
http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames
I guess EdFile can be used.
At least I hope that these macroes are available in the code templates too.
Logged
Vincent Snijders
Administrator
Hero Member
Posts: 2661
Re: Available macros in code templates
«
Reply #2 on:
October 28, 2009, 08:49:14 pm »
Hmm, it seems to a different list of macros. Maybe somebody on the Lazarus list has an idea, otherwise it is a new feature request.
Logged
Vincent Snijders
Administrator
Hero Member
Posts: 2661
Re: Available macros in code templates
«
Reply #3 on:
October 28, 2009, 08:55:22 pm »
Maybe you can use {$I %FILE%}:
http://www.freepascal.org/docs-html/prog/progsu38.html
Logged
wimpie
New Member
Posts: 32
Re: Available macros in code templates
«
Reply #4 on:
October 29, 2009, 05:47:46 pm »
Thanks for the ideas. Those macros only get expanded at compile time. The list of macros that get expanded during template insertion is quite short.
I will add this as a feature request in Mantis.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
Options
»
Available macros in code templates
TinyPortal
© 2005-2018