gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > Convert from VB to C

#37666 - quonic - Mon Mar 14, 2005 11:15 pm

I started playing with VHAM(c,c++) a few weeks ago. just now I tried to write a simple program in VB it became some what difficulte and frustrating; mostly, do to VB has no for loop as in this
Code:
for(i=0;i>10;i++)

Now I dislike VB.
I love C, C++ and others like them; Java, PHP, etc...
VB in my mind was a crutch to my programing skills.
_________________
Comming Soon: http://www.spyingwind.com

#37670 - sajiimori - Mon Mar 14, 2005 11:42 pm

The equivalent of the loop you posted (minus the bug) in VB would be:
Code:

For i = 0 To 9
  ...
Next i

#37672 - Lupin - Tue Mar 15, 2005 12:00 am

You can do everything in VB that you can do with C (on a windows platform that is). Sometimes it requires some hacking, but if you know the language enough (and i think you don't, sorry) you will be able to do everything with it that you want.

VHAM isn't really the best way to start GBA development also, but GBA development might also not be the best way to start programming C (it can be quite complicated, specially when it comes down to assembler and when you leave the world of HAM and use the real GBA registers).
_________________
Team Pokeme
My blog and PM ASM tutorials

#37674 - sajiimori - Tue Mar 15, 2005 12:08 am

Quote:
...you will be able to do everything with it that you want.
Now that's overreaching. What if I want to autogenerate abstract state machines that capture their lexical environment? ;)

#37675 - DiscoStew - Tue Mar 15, 2005 12:23 am

Code:
for(i=0;i>10;i++)

Actually it wouldn't be...
Code:
For i = 0 To 9
  ...
Next i

...because the middle section reads "continue while 'i' is greater than 10", in which since i = 0, which is less than 10, it would exit out of that loop immediately.

Sorry, I couldn't help it.
_________________
DS - It's all about DiscoStew

#37685 - sajiimori - Tue Mar 15, 2005 2:08 am

I said "minus the bug".