Sign in to follow this  
Followers 0
Aceguy

func help please

6 posts in this topic

need help with this code, it should return $mtch=0 then $mtch=50 i tried everthing i know :)

$ss=""
$mtch=""
ConsoleWrite(mtch($mtch) & @LF)

ConsoleWrite(mtch($mtch) & @LF)

Func mtch($mtch)

If IsArray($ss)=0 Then
        ConsoleWrite("is not array"&@lf)
        Return $mtch = 0
        Dim $ss[51]
    Else
        ConsoleWrite("is array"&@LF)
        $mtch=0
        For $_x = 1 To 50
            $mtch += 1
        Next
        Return $mtch
    EndIf

EndFunc   ;==>mtch

Share this post


Link to post
Share on other sites



y are u defining the array as dim $ss[51], after return call??

thats ur problem


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

Rofl, don't you see the Dim is never get executed?

Share this post


Link to post
Share on other sites

here.. this solves ur prob..

$ss=""
$mtch=""
ConsoleWrite(mtch($mtch) & @LF)

ConsoleWrite(mtch($mtch) & @LF)

Func mtch($mtch)

If IsArray($ss)=0 Then
        
        ConsoleWrite("is not array"&@lf)
        Dim $ss[51]
        Return $mtch = 0
        
        
        
    Else
        ConsoleWrite("is array"&@LF)
        $mtch=0
        For $_x = 1 To 50
            $mtch += 1
        Next
        Return $mtch
    EndIf

EndFunc  ;==>mtch

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

wats the prob then?? the script i posted sure gives what u said u want..


[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0