LSL Switch Statement

From Second Life Wiki
Jump to navigation Jump to search

This article is a feature request


The ability to use something like the following:

Switch (variable) 
    case condition 1:
        Do something;
        break;
    case condition 2:
        Do something;
    default:
        Do something;


Note: Isn't LSL all server-side? I don't think this can be implemented in the client. - Ihavegot Wood

LSL is run on the server yes, but the compiler is in the client. LSO wasn't designed with switch statements in mind so some changes to the VM would be required, just wait for Mono. Strife Onizuka