Products Downloads


French version


Vous regardez une version antérieure (v. /doccenter/display/Adelia2057V1401/sameObjectReference) de cette page.

afficher les différences afficher l'historique de la page

Vous regardez la version actuelle de cette page. (v. 1) Actuel »

 

This function compares two variables referencing the same value.

FreeMarker can be used to compare two Number/String/Date/Time/Date-time or Boolean-type variables, but cannot compare two Sequences or Hashes.

It returns "true" if the two variables passed as a parameter reference the same value, "false" if not.

 

Parameters

All types

valRef1

Variable to compare

Mandatory

All types

valRef2

Variable to compare

Mandatory

 


For example

<#-- Return false -->${ hardisCore.sameObjectReference(1, 1) }<#assign aHash = {"attr1": true} aHash2 = {"attr2": false} /><#-- Return false -->${ hardisCore.sameObjectReference(aHash, aHash2) }<#assign aHash2 = aHash /><#-- Return true -->${ hardisCore.sameObjectReference(aHash, aHash2) }<#assign aHash2 = {"attr1": true} /><#-- Return false -->${ hardisCore.sameObjectReference(aHash, aHash2) }

 

 

  • Aucune étiquette