[Gambas-user] internal call in a function from external call

PICCORO McKAY Lenz mckaygerhard at ...626...
Sun Jul 2 15:36:16 CEST 2017


i have two modules, exSysInfo and exSysNet

in the exSysNet i have:

Public Function getIpdef(Optional defIf As String = getIfdef()) As String

    commandshelltmp = "ifconfig " & defIf & " | grep -Eo 'inet
(addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v
'127.0.0.1'"

End

note in the definition i have a call to other function in the parameter..

MY QUESTION ARE:

i in the other module, i made:

    sIPs = exModSysNet.getIpdef()

how can the gambas determine the default value if ate a call to internal,
due the context was external..


so i must put the function as :

Public Function getIpdef(Optional defIf As String = THIS.getIfdef()) As
String

of i must put the function as :

Public Function getIpdef(Optional defIf As String = ME.getIfdef()) As String

or how? or i must called internally in the function the getifdef() ? event
in the parameter?

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com



More information about the User mailing list