Log Function

Category: GUI » Visual Basic 6 » Function

Description: Returns the natural Logarithm of a number Syntax: Log(number)

ParametersDescription
number Required. Any numeric expression

Return Data Type: xxx Usage / Example Code:

StatementResult / ValueRemark / Note
log(1) 0  
log(10) 2.30258509299405  
log(-1) Error Run-time error '5': Invalid procedure call or argument
log(0) Error Run-time error '5': Invalid procedure call or argument
log(unknown) Error Run-time error '5': Invalid procedure call or argument
log(null) Error Run-time error '94': Invalid use of Null
log("string") Error Run-time error '13': Type mismatch
log("10") 2.30258509299405 Input number as string
log(True) Error Run-time error '5': Invalid procedure call or argument
log(False) Error Run-time error '5': Invalid procedure call or argument
log() Error Compile error: Argument not optional

Related Articles:

Tags: Math Functions, vb6