# \#macro

**URL:** https://swi-prolog.discourse.group/tag/macro/165.md

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

---

## [Want to get minimal term\_expansion example working](https://swi-prolog.discourse.group/t/want-to-get-minimal-term-expansion-example-working/8739)

<div class="topic-metadata">

**Author:** [@robert314](https://swi-prolog.discourse.group/u/robert314)\
**Replies:** 3\
**Last updated:** [January 21, 2025, 3:21pm UTC](https://swi-prolog.discourse.group/t/want-to-get-minimal-term-expansion-example-working/8739 "2025-01-21T15:21:27Z")

</div>

I’m using: SWI-Prolog version 9.3.18 for x64-win64 I want to: write a prolog file that when consulted then it rewrites the term xaxis in the file consulting it or user’s session to the compound term vector(1, 0, 0). Bu…

---

## [New library(macros)](https://swi-prolog.discourse.group/t/new-library-macros/6571)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 0\
**Last updated:** [May 24, 2023, 7:48pm UTC](https://swi-prolog.discourse.group/t/new-library-macros/6571 "2023-05-24T19:48:20Z")

</div>

I pushed a new library(macros). This is intended to deal with the common need to declare compile time constants, write more complex terms using a simpler syntax, etc. The overall idea is that a macro is used as #name…

---

## [New library(macros) reply 1](https://swi-prolog.discourse.group/t/new-library-macros-reply-1/6574)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 1\
**Last updated:** [May 25, 2023, 8:54am UTC](https://swi-prolog.discourse.group/t/new-library-macros-reply-1/6574 "2023-05-25T08:54:56Z")

</div>

Referring to the announcement. Can these be used with DCGs?
