From: Alan T. DeKok Date: Mon, 2 Oct 2023 19:04:22 +0000 (-0400) Subject: note that %expr is no longer needed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2565039338e5ef900f1511fb42056880f359f045;p=thirdparty%2Ffreeradius-server.git note that %expr is no longer needed --- diff --git a/doc/antora/modules/reference/pages/xlat/builtin.adoc b/doc/antora/modules/reference/pages/xlat/builtin.adoc index 14cf29e912a..99de6151aff 100644 --- a/doc/antora/modules/reference/pages/xlat/builtin.adoc +++ b/doc/antora/modules/reference/pages/xlat/builtin.adoc @@ -871,38 +871,13 @@ not bob! === %expr() -Evaluates the string as an xref:reference:unlang/expression.adoc[Unlang expression], and returns the result. Please see the -xref:reference:unlang/expression.adoc[Unlang expression] page for full documentation on expressions. - -[NOTE] -==== -You probably don't want to use this. In v4, the main use of `%expr(...(` is inside of strings which can't be split into actual expressions. -==== - -.Return: _data_ - -.Example - -[source,unlang] ----- -&reply.Tmp-String-0 := "%expr(1 + 2}" ----- - -.Output - -``` -3 -``` - -.A Better example of not using `%expr(...)` +This expansion has been removed. Instead, just use `%{...}` with math inside of the brackets. [source,unlang] ---- -&Tmp-String-0 := 1 + 2 +&reply.Reply-Message := "Adding 1 + 2 = %{1 + 2}" ---- - - === %nexttime(