Fork me on GitHub

Name Syntax

In SARL, the names of the features (agents, variables, fields, etc.) cannot be one of the keywords of SARL or Java. For example, since event is a keyword in SARL, the following is illegal:

import io.sarl.event.ActionEvent

To solve this problem (since some names come from Java, and this language has different keywords than SARL), it is possible to prefix the name fragment with the character ^:

import io.sarl.^event.ActionEvent

1. References

This documentation is based on documentations from the Xtext and Xtend projects, and from the Java tutorials. Thank you to the contributors to these documents.

2. Version Specification

Copyright © 2014-2025 SARL.io, the Original Authors and Main Authors.

Documentation text and medias are licensed under the Creative Common CC-BY-SA-4.0; you may not use this file except in compliance with CC-BY-SA-4.0. You may obtain a copy of CC-BY-4.0.

Examples of SARL code are licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the Apache License. You may obtain a copy of the Apache License.

You are free to reproduce the content of this page on copyleft websites such as Wikipedia.

Generated with the translator docs.generator 0.15.1.