Three small apps

Zambody

Member
Licensed User
Longtime User
Hi,
I'm new to this environment and building my first apps in
Basic4ppc. There is still much to learn and probably can
some parts be coded in a more efficient or elegant way.
Sharing 3 of my first attempts, a reaction test, decoding
of color code for resistors an a simple electronic simulation
of an astable with NE555. Comments and suggestions are welcome.

/Soren
 

Attachments

  • small_apps.zip
    42.4 KB · Views: 344

taximania

Well-Known Member
Licensed User
Longtime User
Welcome to the forum

I like the resistor colour app.

Simple, but visual :sign0060:

There are a couple of programming points I could make,
but as your new to the forum I'll leave it for now ;-)

If you wish me to point them out, feel free to ask
 

Zambody

Member
Licensed User
Longtime User
Hi, and Thanks for comment,

>If you wish me to point them out,..

Yes, I posted those, partly to show possible tekniks but also to get respons from
more experianced B4ppc users. I have coded in Borland C++Builder for a number of years
and even if there are similarities there are big differences too. You can not target
windows mobile from there in an easy way.

I'm interested in how to build in this enviroment. All comments are welcome!

/Soren
 

taximania

Well-Known Member
Licensed User
Longtime User
Ok, here's a couple for starters.
Use ImageButtons instead of panels for the colour selections.

Check the basic4ppc help for the 'Control', and AddEvent' keywords.

Then use the 'Control' Button 'Click' and 'Sender' options.

Sorry If you've lost me :sign0137:
But you don't need to have 10 seperate condition subs
for colour selection in this instance.

I'll explain more tomorrow.
 

Zambody

Member
Licensed User
Longtime User
Thanks for the hints
I really appreciate the friendly and helpful atmosphere in
this forum. I have had Basic4PPC for about a week and it
looks very good. Reminds me a bit of Comal, a language I used 25
years ago, a structured basic with Pascal like syntax.

/Soren
 

klaus

Expert
Licensed User
Longtime User
Hi Zambody,

I had also a look at your resistor program, and played a bit with it.

Attached you find 2 versions of your program showing some more possibilities of coding with B4PPC.

Best regards.
 

Attachments

  • Resistor.zip
    13.4 KB · Views: 302

Zambody

Member
Licensed User
Longtime User
Thanks allot!

I was glad to find Sender and AddEvent, those are common tool in C++ but I had not discovered
them here, shortened my code with about 20 lines.
I will study Your modifications. This is a great way to get a fast start in a new environment.
I'm trying to copy the functionality from small C++ example I've given my students, to
Basic4PPC, to learn the tools and syntax here. I compiled my 1:st code back in 1965,
Fortran IV and target an IBM Mainframe with punched cards, and all that stuff.
Today I'm retired and coding is a good way to keep the head working.

( sorry my English is far from perfect... )

Thanks agan
/Soren
 

klaus

Expert
Licensed User
Longtime User
Fortran IV and target an IBM Mainframe with punched cards, and all that stuff.
This reminds me also some 'old' stories, I bagan programing in the early 70's and it has been a hobby since that time.

Today I'm retired and coding is a good way to keep the head working.
I totaly agree with you, same for me!

Best regards.
 

mjcoon

Well-Known Member
Licensed User
Today I'm retired and coding is a good way to keep the head working.

( sorry my English is far from perfect... )

Me too; started computing for fun, did it for money for 40 years and now just do it for fun again...

BTW I commend the verb "to confute". Could be defined as "to prove wrong by demonstration", which is often what computers actually do!

Mike.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…