my best effort

For other topics related to the FreeBASIC project or its community.
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 18, 2018 21:57

Hi Paul I will activate your account. What username did you register.
paul doe
Posts: 803
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: my best effort

Postby paul doe » Oct 18, 2018 22:04

owen wrote:Hi Paul I will activate your account. What username did you register.

Same as here, paul doe (or pauldoe, I can't quite remember) =D

Had a look at the forum, and saw you're playing with a pong-like game. Nice way to introduce programming concepts: by playing. Once registered, I'll introduce myself and will be happy to help =D
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 18, 2018 22:06

My forum receives a lot of spam so I have them deleting all of the unknown registrations on a regular basis perhaps they have deleted your registration request which means you might have to re-register and when you do make sure you contact me right away so that I can activate you guys
paul doe
Posts: 803
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: my best effort

Postby paul doe » Oct 18, 2018 22:08

owen wrote:My forum received a lot of spam so I have them deleting all of the unknown registrations on a regular basis perhaps they have deleted your registration request which means you might have to re-register and when you do make sure you contact me right away so that I can activate you guys

Ok, done. Registered as 'paul doe', same as here. Waiting for the mail, then =D
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 18, 2018 22:11

Okay Paul you are activated Welcome to our forum
paul doe
Posts: 803
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: my best effort

Postby paul doe » Oct 18, 2018 22:26

owen wrote:Okay Paul you are activated Welcome to our forum

Ah ok! I'll introduce myself there, then. Thanks, owen.
fxm
Posts: 8424
Joined: Apr 22, 2009 12:46
Location: Paris (suburbs), FRANCE

Re: my best effort

Postby fxm » Oct 19, 2018 9:38

At FbCadCam Forum, yajra1219 wrote:.....
PLAN OF THE DAY:
1.) Learn more about free basic.
.....

The first lesson is to well write the name of the language: FreeBASIC (in one word).
LOL :-)
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 20, 2018 0:54

fxm glad to see you stopped by for a visit thank you.
By the way did you know that "free basic" is the newest programming language out there. Awesomeness, that's all I got to say.
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 20, 2018 11:50

Here are the words of Emerson (the math teacher / engineer). He granted me permission to share them here with you guys and I am very excited to do in hope that it will inspire you the members of this community to participate in this great effort.

"hi Fbcadcam team,
as per sir Owen's request, we will discussing some trigonometry next week God willing.. topics will be on triangles and sine, cosine, tangent functions as well as the sine law and also on how to use scientific calculator which deals with sine law. We will also try to make a graph of sine curve.
pls. bring a ruler, graphing paper and a protractor and also a notebook for some topics needed to be written.. as the latest studies says that taking down notes will increase our memory retention especially for this basic and common knowledge that a Fbcadcam warrior must have.. have a nice day!!!"
paul doe
Posts: 803
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: my best effort

Postby paul doe » Oct 20, 2018 13:12

owen wrote:Here are the words of Emerson (the math teacher / engineer). He granted me permission to share them here with you guys and I am very excited to do in hope that it will inspire you the members of this community to participate in this great effort.

Very nice. I'm preparing something that you could use as a teaching vehicle (my version of the Pong game your students are coding). It illustrates some rudiments of procedural programming, as I consider object-oriented programming, my preferred paradigm, a little too much at this stage. It also shows some capabilities and traits of FreeBasic, such as using simple types and initializing them. Nothing too advanced, don't worry =D

If you're going to delve into trigonometry, I'll recommend that you also treat vectors and some simple vector operations (as addition, substraction, normalization, etc), since they're very useful to show how trigonometric functions and identities relate to each other.

I'm almost finished, and when I'm done, I'll land on your forum, introduce myself, and help dissipate any doubts that may arise regarding the code. Until then.
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 20, 2018 13:30

Paul you are too generous thank you in advance and thank you for being understanding and patient with these beginners. And by the way I will learn from what you post as well because I still consider myself a beginner.
I have mentioned your name to them and they are anticipating and very excited to read your posts.

I believe this weekend they are purchasing a 40 inch widescreen TV and hooking up a Android Digi box or something like that to it. This will make it easier for me to tutor them. At the moment I share my screen with them on Skype using their laptops and I think that's the way we will do it with the TV setup. Ps I have no idea what Android Digi box is but they said that was the less expensive approach so I got it for them.
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 20, 2018 13:42

Also Paul I want you to know your contribution to this forum has been significant and duly noted. Because of this and your anticipated efforts for these people it is my pleasure to compensate you if you will allow me to.
paul doe
Posts: 803
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: my best effort

Postby paul doe » Oct 21, 2018 22:55

owen wrote:Paul you are too generous thank you in advance and thank you for being understanding and patient with these beginners. And by the way I will learn from what you post as well because I still consider myself a beginner.
I have mentioned your name to them and they are anticipating and very excited to read your posts.

Well, thanks. I also like to consider myself an eternal beginner. It helps in keeping the mind in a perpetual learning state. After all, a day where you didn't learnt something is a wasted day =D
owen wrote:Also Paul I want you to know your contribution to this forum has been significant and duly noted. Because of this and your anticipated efforts for these people it is my pleasure to compensate you if you will allow me to.

I'm glad that my crap contributions were actually useful to somebody hahaha. That's a very generous offer, Owen, thank you. But before we discuss compensation, though, we'll have to discuss about work =D

Now, I want you to know that I'm officially in awe of your accomplishments. You see, while everybody can indeed make the difference, very few people actually bother, and you're one of those few. I'll be more than happy to help you in whatever way I can. This quote changed my life when I read it, and reminds me a lot of you:

"It is not the critic who counts, not the man who points
out how the strong man stumbles or where the doer of
deeds could have done them better. The credit belongs to
the man who is actually in the arena, whose face is marred
by dust and sweat and blood, who strives valiantly, who
errs and comes up short again and again because there is
no effort without error and shortcomings, who knows the
great devotion, who spends himself in a worthy cause,
who at the best knows in the end the high achievement of
triumph and who at worst, if he fails while daring greatly,
knows his place shall never be with those timid and cold
souls who know neither victory nor defeat." -Theodore Roosevelt
Last edited by paul doe on Oct 22, 2018 4:35, edited 1 time in total.
owen
Posts: 497
Joined: Apr 19, 2006 10:55
Location: Kissimmee, FL
Contact:

Re: my best effort

Postby owen » Oct 22, 2018 2:39

OK I admit it: I am new to oop. In prep for Paul's contribution I am trying to explain some stuff and ran into a question about passing UDT's through subs and functions.
Why does draw_ball_2(ByRef b) not work?

draw_ball_1(ByVal b) works
draw_ball_2(ByRef b) does Not work
draw_ball_3(b) works (And Is passed ByRef As Default)



Code: Select all

ScreenRes 600,400
Window(0,0)-(600,400)

Type ball
   x As Integer
   y As Integer
   r As Integer
   c As Integer
End Type

Declare Sub draw_ball_1(ByVal aball As ball)
Declare Sub draw_ball_2(ByRef aball As ball)
Declare Sub draw_ball_3(aball As ball)

Dim b As ball
b.x=300
b.y=200
b.r=100
b.c=14

Circle(b.x,b.y),b.r,b.c
Print "press any key"
Sleep
Cls
b.c=13
draw_ball_1(ByVal b)
Circle(b.x,b.y),b.r,b.c
Print "press any key"

Sleep
draw_ball_2(ByRef b)
Circle(b.x,b.y),b.r,b.c
Print "press any key"

Sleep
draw_ball_3(b)
Circle(b.x,b.y),b.r,b.c
Print "press any key"

Sleep


Sub draw_ball_1(ByVal aball As ball)
   Circle(aball.x,aball.y),aball.r,aball.c
   aball.r=50
End Sub

Sub draw_ball_2(ByRef aball As ball)
   Circle(aball.x,aball.y),aball.r,aball.c
   aball.r=200
End Sub

Sub draw_ball_3(aball As ball)
   Circle(aball.x,aball.y),aball.r,aball.c
   aball.r=300
End Sub

dafhi
Posts: 1220
Joined: Jun 04, 2005 9:51

Re: my best effort

Postby dafhi » Oct 22, 2018 3:43

here's a quick thing you can look at

Code: Select all

type tType
 as string s = "-"
 declare constructor(as string = "")
end type

constructor tType(i as string)
 if i = "" then exit constructor
 s = i
end constructor


sub test_byref(byref t as tType)
 t.s = "ByRef"
end sub

sub test_default(t as tType)
 t.s = "default"
end sub


sub Main
 
 #macro test(sub)
  sub a
  ? a.s
 #endmacro

 dim as tType a

 test(test_byref)
 test(test_default)
 
 sleep
end sub

Main

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests