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
Как правильно создать на ...
by
n7800
[
Today
at 10:56:04 pm]
[ANN] Fibo Code Format (F...
by
Fibonacci
[
Today
at 10:48:26 pm]
Benchmark regular vs SIMD...
by
MathMan
[
Today
at 10:27:48 pm]
Death of the Power User
by
VisualLab
[
Today
at 08:22:27 pm]
Discipline your AI coding...
by
440bx
[
Today
at 07:36:11 pm]
FPC Unleashed (inline var...
by
440bx
[
Today
at 07:26:45 pm]
Anubis's website security...
by
rvk
[
Today
at 07:21:50 pm]
Trayslate 1.2.0 - Free tr...
by
AlexanderT
[
Today
at 07:21:43 pm]
How to wait until a WebDA...
by
Lutz Mändle
[
Today
at 06:41:49 pm]
LazNodeEditor (visual nod...
by
avra
[
Today
at 06:02:00 pm]
[SOLVED] Curious why this...
by
1HuntnMan
[
Today
at 04:57:24 pm]
Klondike solitaire Part 2
by
TBMan
[
Today
at 04:16:40 pm]
Cannot get FTP to work
by
rvk
[
Today
at 03:32:36 pm]
Problem with upgrading to...
by
wp
[
Today
at 03:15:03 pm]
Anubis activated
by
rvk
[
Today
at 12:45:50 pm]
Can Lazarus support Auto-...
by
Martin_fr
[
Today
at 12:33:34 pm]
TFONT and related init ?
by
jamie
[
Today
at 12:17:36 pm]
ERROR: The current FPC ha...
by
Thaddy
[
Today
at 11:53:06 am]
Run code during DLL load
by
LemonParty
[
Today
at 11:48:20 am]
GocciaScript: JavaScript ...
by
Tomxe
[
Today
at 11:39:14 am]
text color visible
by
hedgehog
[
Today
at 10:36:48 am]
SYnEdit lose cursor
by
Martin_fr
[
Today
at 09:50:48 am]
Portable verion of FPC an...
by
marcov
[
Today
at 09:46:14 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[
Today
at 09:41:18 am]
paszlib. Feature request ...
by
LemonParty
[
Today
at 08:09:37 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Available macros in code templates (Read 6415 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