Statements and Functions > ForResource()

ForResource()

Shift & Break System Function

Syntax samples

FORRESOURCE()

IF FORRESOURCE() THEN GET Res1

Description

This function returns TRUE if the object executing the shift or break logic is a resource.

Valid In

All Shift or Break logic.

Example

A shift called DAYS.SFT has five resources and eight locations assigned to it. When the resources go off-shift, it is desired to write the resource name and simulation time to a file called RES_TIME. The following logic is placed in the off-shift logic.

IF FORRESOURCE() THEN

{

XWRITE res_time, "Shift for " $ RES(Resource()) $ "ended at " $ Clock(hr) $ “.”

}

See Also

FORLOCATION(). Also see Shift & Break Logic.


© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com