Function_CParams
issueid=332 08-11-2011 23:00
Member
Number of reported issues by dcromley: 6
Function_CParams
Function_CParams doesn't give correct count; gets lost as a call parameter

Function_CParams
A couple of problems:
1) For the statement "v1 = Func1("B",11)", Function_CParams should be 2?
2) Func2(Function_CParams) should be same As Function_CParams?

  Uses "Console"        
  Global v1 As Single

  v1 = Func1("A")
  PrintL "          should have printed  1 1", $CRLF
  v1 = Func1("B",11)
  PrintL "           should have printed  2 2", $CRLF
  WaitKey
   
Function Func1(txt As String, Optional y As Single) As Single
  PrintL "Func1 receives ", txt, y, "; CParams=", Function_CParams, Func2(Function_CParams)
  Function = 22
End Function

Function Func2(z As Long) As Long
  PrintL "Func2 receives  " & str$(z)
  Function = z
End Function
As always, regards, Dave
Issue Details
Issue Number 332
Project thinBasic
Category Core engine (thinCore.dll)
Status Fixed
Priority Unknown
Affected Version 1.8.9
Fixed Version 1.9.1
Milestone thinBasic 1.9.0.0
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




09-11-2011 09:44
Super Moderator
Hi Dave,

I can replicate this. Good catch!


Petr

10-11-2011 22:23
thinBasic author
Exactly, good catch!.
Fixed. Also fixed "Function_NParams"

Will be present in next release.

11-11-2011 01:49
Member
Thanks!

+ Reply