I can do this: Code (csharp): if ("abc" in value){ if (script.othervalue){ doathing(); }else{ script.doanotherthing(); } } but I can not do this: Code (csharp): if ("abc" in value script.othervalue){ doathing(); }else{ script.doanotherthing(); } and this doesn't work either: Code (csharp): if ("abc" in value script.othervalue != 0){ doathing(); }else{ script.doanotherthing(); } all of this is pseudocode btw, in case you think I'm compelty abstracting everything, lol. this is all being evaluated inside of this context (in case it has any baring): Code (csharp): Switch (variable){ case "value": /*stuff from above goes here*/ break; ... } any reason this doesn't work? error being returned is: Code (csharp): MissingMethodException: Method not found: 'System.String.op_Member'. Boo.Lang.Runtime.MethodDispatcherFactory.ProduceExtensionDispatcher () Boo.Lang.Runtime.MethodDispatcherFactory.Create () Boo.Lang.Runtime.RuntimeServices.DoCreateMethodDispatcher (System.Object target, System.Type targetType, System.String name, System.Object[] args) [0x00000] Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher (System.Object target, System.String name, System.Object[] args) [0x00000] Boo.Lang.Runtime.RuntimeServices+<>c__DisplayClass1.<Invoke>b__0 () Boo.Lang.Runtime.DispatcherCache.Get (Boo.Lang.Runtime.DispatcherKey key, Boo.Lang.Runtime.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, System.Object[] args, Boo.Lang.Runtime.DispatcherFactory factory) [0x00000] Boo.Lang.Runtime.RuntimeServices.Dispatch (System.Object target, System.String cacheKeyName, System.Object[] args, Boo.Lang.Runtime.DispatcherFactory factory) [0x00000] Boo.Lang.Runtime.RuntimeServices.Invoke (System.Object target, System.String name, System.Object[] args) [0x00000] Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOperator (System.String operatorName, System.Object lhs, System.Object rhs) and I JavaScript, I do not boo.
lol maybe the 'in' keyword is confusing the compiler try a container lookup function like Contains() or IndexOf() the 'in' keyword doesn't do a value lookup in containers in all languages, maybe thats the case for javascript
Thanks so much rozgo! Guess I was looking for a flaw in my logic, but what you said makes sense. I'll try that. Thanks again!