Skip to content

6. Path values

Canonical source: protos/tutorials/06-path-values/ at locked revision e99b712ecf658a527b1fe82c8beba2c1286d8dc9.

These are the executable tutorial sources from the exact Protos revision consumed by this website. The fenced program bodies are copied without modification. The tutorials are explanatory and non-normative; the applicable specification remains authoritative.

Canonical source protos/tutorials/06-path-values/01-structure-and-identity.protos

/*
* THE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THE ADAPTIVE PUBLIC LICENSE
* ("LICENSE") AS FIRST COMPLETED BY: Guillermo Adrián Molina. ANY USE, PUBLIC
* DISPLAY, PUBLIC PERFORMANCE, REPRODUCTION OR DISTRIBUTION OF, OR PREPARATION OF
* DERIVATIVE WORKS BASED ON, THE LICENSED WORK CONSTITUTES RECIPIENT'S ACCEPTANCE
* OF THIS LICENSE AND ITS TERMS, WHETHER OR NOT SUCH RECIPIENT READS THE TERMS OF
* THE LICENSE. "LICENSED WORK" AND "RECIPIENT" ARE DEFINED IN THE LICENSE. A COPY
* OF THE LICENSE IS LOCATED IN THE TEXT FILE ENTITLED "LICENSE.TXT" ACCOMPANYING
* THE CONTENTS OF THIS FILE.
*/
// Path values compare structurally with ==, while === remains ordinary
// individual object identity.
a: Path.relative().child("docs").child("guide")
b: Path.relative().child("docs").child("guide")
print(a == b)
print(a === b)
print(a !== b)

← Collections · Tutorials index · Call arguments →