ActiveState Powered by ActiveState

ActiveState Community


VBScript Converter and whaddaya mean "Syntax error"?

Posted by axtens on 2008-03-17 01:37

Okay, maybe at a push I can understand the translator having issues with
On Error GoTo 0
but what's the story with complaining about the
GetEnv = .Environment( "PROCESS" )( UCase( sEnvVar ) )
in this

Function GetEnv( sEnvVar )
      With CreateObject( "WScript.Shell" )
          GetEnv = .Environment( "PROCESS" )( UCase( sEnvVar ) )
      End With
  End Function

?

I do that kind of stuff fairly often. And it's certainly not a syntax error in VBScript!

Anyone know why this is catching in VC's throat?

Kind regards,
Bruce.

ericp | Mon, 2008-03-17 09:49

I repro'ed it with this code:

foo = Array(1, Array(3, 4, 5, 6), 3)
a = foo(1)(2)
wscript.echo(a)
foo = Array(1, Array(3, 4, 5, 6), 3)
a = foo(1)(2)
wscript.echo(a)

Bug logged at http://bugs.activestate.com/show_bug.cgi?id=75710

-->