All pastes #879500 Raw Edit

Stuff

public text v1 · immutable
#879500 ·published 2008-01-29 17:24 UTC
rendered paste body
    method Hibernate(string ObjectString, bool Hibernate)
    {
        variable int Idx = 1
       
        if ${This.Items.Get[${Idx}](exists)}
        {
            do
            {
                if ${This.Items.Get[${Idx}].ObjectString.Equal[${ObjectString}]}
                {
                    This.Items.Get[${Idx}].Hibernate:Set[${Hibernate}]
                    if ${This.Hibernate}
                    {
                        This:Echo["${ObjectString} went to sleep."]
                    }
                    else
                    {
                        This:Echo["${ObjectString} woke up."]
                    }
                    return
                }
            }
            while ${This.Items.Get[${Idx:Inc}](exists)}
        }
    }