(06-11-2024, 06:44 PM)TerryRitchie Wrote: A challenge has been added to Lesson 12: Add sound effects to the slot machine created in Lesson 10.Thanks a lot Terry! I'm taking some time to reread and get a better understanding of what I've done so far (first 10 Lessons), before moving on with the new material. I've played a lot with your PONG game lately ... I'm doing some progress and I hope sooner or later to win a match
The tutorial asset file has been updated to include the Lesson 12 challenge solution and sound files.
Doing some of the exercises last week and rereading Lesson 6 on FUNCTIONs and SUBs I found some difficulty in understanding how differently functions and subroutines are called (syntactically) in QB64: the difference depends on the fact that functions return a value and subroutines don't, they do some stuff but they have no value to return, but that means also that they are invoked differently in the source code:
provided one has defined a subroutine DrawCircle (center, radius) that sub is invoked by writing
DrawCircle center, radius
but if one has defined a function AreaCircle (radius) that function is invoked typically by writing
Area! = AreaCircle (radius)
that is a function call usually appears on the right hand side of an assignment operation in which the value returned is assigned to a variable, where subs don't do this. Is it correct? I'll let you know about my progress (or regress)
PS: of course only the radius is needed to calculate the area. The center only to draw a circle on screen