]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add notes on automatic casting
authorAlan T. DeKok <aland@freeradius.org>
Tue, 19 Dec 2023 01:14:10 +0000 (20:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 19 Dec 2023 01:14:10 +0000 (20:14 -0500)
doc/antora/modules/reference/pages/unlang/condition/cmp.adoc
doc/antora/modules/reference/pages/unlang/edit.adoc

index 8fe818580e34dcd49ef2b4d866a9a2ff07385914..8bc778aacff50924150125099b75b0f731666fc4 100644 (file)
@@ -36,6 +36,8 @@ only exceptions are the xref:unlang/condition/regex.adoc[regular expression] ope
 which interpret the `lhs` as a printable string, and the `rhs` as a
 regular expression.
 
+Comparisons can be done across differing data types.  Comparng a `uint8` value to an `uint16` value will "just work", as the data types will be automatically converted before any comparison is done.
+
 == IP Address Comparisons
 
 The type-specific comparisons operate as expected for most data types.
index f7c84a2e75e37bc67da4ee26f85ddb4d5cdfcb26..a25721238f0bb3c602890af67b7c92ae82b13f3a 100644 (file)
@@ -395,6 +395,8 @@ Similarly, subtracting two 'ipv4addr' data types results in a
 numerical value.  Adding a `time_delta` or `integer` to a `date` will
 result in a `date`.
 
+Similarly, assignments and/or modifications can be done across differing data types.  Adding a `uint8` value to an `uint16` value will "just work", as the data types will be automatically converted before assignments or operations are done.
+
 === Operations on `string` and `octet` Data Types
 
 The operators also apply to variable-sized values.