{"name":"a : b","operator":":","title":"a : b","type":"command","url":"https://community.bistudio.com/wiki/a_:_b","revid":329506,"updated":"2022-07-29T13:38:09Z","groups":["Program Flow"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"See switch","syntaxes":[{"syntax":"a : b","since":null,"effect":null,"exec":null,"params":[{"name":"a","type":"Switch Type","optional":false,"default":null,"description":null,"types":["Switch Type"],"since":null,"text":"a: Switch Type"},{"name":"b","type":"Code","optional":false,"default":null,"description":null,"types":["Code"],"since":null,"text":"b: Code"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":":","left":{"text":"a","types":["Switch Type"]},"right":{"text":"b","types":["Code"]}}],"examples":[{"text":"```sqs\n? (_var == _test) : hint \"_var is equal to _test!\";\n```","code":["? (_var == _test) : hint \"_var is equal to _test!\";"]},{"text":"```sqf\nswitch (_condition) do\n{\n    case 1: { hint \"1\" };\n    case 2: { hint \"2\" };\n    default { hint \"default\" }; // note: NO colon for the default case\n};\n```","code":["switch (_condition) do\n{\n\tcase 1: { hint \"1\" };\n\tcase 2: { hint \"2\" };\n\tdefault { hint \"default\" }; // note: NO colon for the default case\n};"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Control Structures","switch"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Program Flow","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}