Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: if-then-else alternative to Platform.case
name
code content
// Normally, controlling platform specific commands is implemented with Platform.case: ( Platform.case {\osx} { openOS("https://apple.com") } {\linux} { openOS("https://linux.com") } {\unix} { openOS("http://unix.org") } {\windows} { openOS("https://microsoft.com") } ); // But what if you need an 'if-then-else' style of Platform control? // In these situations, the Platform.case method isn't the most elegant, or efficient solution. // Here is an alternative route: if( thisProcess.platform.asSymbol == 'an OSXPlatform', { // true function }, { // false function } )
code description
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change