Start Programming

In this category you can exchange your programming questions and solutions.
Post Reply
cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Start Programming

Post: # 550Post cvirus
Tue Jan 12, 2010 8:41 pm

Hello, i?m new to programming, i was wondering if FNXBASIC is a good place to start?

Thankz

cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Start Programming

Post: # 551Post cvirus
Thu Jan 14, 2010 5:14 pm

By the way, i modified one exemple so the code could be to begginers more self explain..., I hope that you dont get mad wit it, if so delete this post please.

So the code is

[code]
Dim myform as form
Dim mybutton(2) as button
Dim t as integer
For t=0 to 2
Mybutton(t).onclick=buttonclick
Mybutton(t).top=t*30
Mybutton(t).parent=myform
Mybutton(t).tag=t
Mybutton(t).Caption =str$(Mybutton(t))
Next t
Myform.showmodal
Sub buttonclick(object as button)
Select case object.tag
Case 0 : showmessage ("button 0" )
Case 1 : showmessage ( "button 1")
Case 2 : showmessage ( "button 2")
End select
End sub
[/code]

I have notice that sometimes the parentisis must be close to some functions or equal sins, this way the code doens give errors.

magna
Posts: 30
Joined: Tue Nov 08, 2005 3:00 pm

Start Programming

Post: # 552Post magna
Fri Jan 15, 2010 8:51 am

I think you derived it from arrayofbutton.bas, right? This snipplet didn`t only show how to define an array of buttons but also how to display them in a grid but that might have confused you.

If you are going to learn how to program, Basic in general might be a good choice. FNX-Basic even lets you create small programs with a native GUI. But there are still some gotchas with it, like the bug with spaces before and/or after equal signs. If you know them it might be a great language to start with. And I`m sure you will find some help in this forum.

cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Start Programming

Post: # 553Post cvirus
Fri Jan 15, 2010 12:50 pm

yes it is the array of buttons, i have notice that FNX have some bugs regar to space between = singns and other too, thaks for the replay.

I?m starting to get the hang of it. :D

cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Start Programming

Post: # 554Post cvirus
Fri Jan 15, 2010 1:05 pm

By the way, it?s better to start with the new beta or stay with the old version?

fred
Posts: 54
Joined: Thu Apr 23, 2009 10:08 am

Start Programming

Post: # 555Post fred
Fri Jan 15, 2010 6:03 pm

You can use them both if you want, just put then in different folders.
I found the old version better, like in the way more stable but that`s my opinion.
I only wished there were more frequent updates.
In the mean time i have tried another language what i start to like now but i hope fnxBasic gets updated/better because i like the language structure.

Post Reply