Skip to content

longitude

Syntax

longitude()
longitude(place_name)

Parameters

place_name
The name of a place that the agent can visit.

Returns

With no argument, this returns the longitude of the agent itself.

If place_name is given, then the longitude of the agent's site for this place is returned.

Description

This action returns the longitude of the agent itself if no argument is given. Otherwise it returns the longitude of the agent's site for the given place name. For example, longitude(Workplace) returns the longitude of the agent's specific Workplace site.

If no parameter was provided, this action returns the longitude of the agent itself.

Important

An agent's coordinates are not updated unless the agent has been explicitly moved using a move-related action.

If a place parameter is provided, it is an error if the agent is not a member of that place.

Examples

This statement returns the longitude of the agent's school

longitude(School)

See Also