Returns or sets the name of the object.
Object.Name [ = sName ]
The Name property syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
ASemaphore |
ASemaphore object |
|
sName |
BString |
A text string used to name the object. |
This property is assigned by the container of the object.
The default name for new objects is the kind of object plus a unique integer. For example, the first new ASemaphore object is ASemaphore1 and the second is ASemaphore2.
An object's Name property must start with a letter and can be a maximum of 40 characters. It can include numbers and underline (_) characters but can't include punctuation or spaces. Although the Name property setting can be a keyword, property name, or the name of another object, this can create conflicts in the programming code. Two objects of different types can't share the same name.
ASemaphore synchronization objects in different processes with the same Name property will function as if they were a single synchronization object to allow ASemaphore synchronization between different processes.
The following statement changes the ASemaphore Name to "SempahoreBeta":
sem1.Name="SemaphoreBeta"