Petit Computer Online Source
Would you like to react to this message? Create an account in a few clicks or log in to continue.

This is not my C

3 posters

Go down

This is not my C Empty This is not my C

Post  Gamer_Mason Sun Oct 07, 2012 9:47 pm

main(){
cout << "I'm lost.";
return(0);
}

Just kidding. I downloaded Petit Computer a couple days ago because I discovered that all the programs I wrote in BASIC on my ti-89 had been vaporized. My text fight against Elton John has disappeared. He will no longer unleash the power of rock for massive damage. There was a timing component to it too, so I'm sad that it's gone.

I downloaded Petit Computer because I wanted to be able to program on the go. When I'm on the bus to places, or on long car trips. I don't really know the language too well though. I used the PAUSE feature on the TI-89 to stop things from happening, but it looks like that doesn't exist here. I tried learning C++, but I have trouble getting myself to open up the program on my computer, so having a dedicated BASIC language on hand near me helps to keep me focused.

Even if I don't yet have a good grasp on the language, it's still a really nifty sharing tool, so it's already payed for itself as far as I think.

Hi.
Gamer_Mason
Gamer_Mason

Posts : 6
Join date : 2012-10-07
Age : 29

Back to top Go down

This is not my C Empty Easy

Post  boxtropica Mon Oct 08, 2012 9:34 am

BASIC in Petit Computer is very very VERY easy to use. Though BASIC isn't my favorite language- *C++, LUA* - It is nice to fiddle around with ;D
P.S. The function for PAUSE in Petit BASIC is WAIT *Number here*
boxtropica
boxtropica
Admin

Posts : 26
Join date : 2012-09-06

https://conlogxl.forumotion.com

Back to top Go down

This is not my C Empty Re: This is not my C

Post  GrabSomeEyes Mon Oct 08, 2012 7:10 pm

Gamer_Mason wrote: I tried learning C++, but I have trouble getting myself to open up the program on my computer,
You too?
Darn you C++ and your confusing program system!
Anyway, welcome to the forums!
Edit: Also, I'm pretty sure the WAIT time is in frames, and Petit Computer runs at around 60 fps typically if I remember correctly, so 60 should be 1 second without slowdown. Hope this helps.
GrabSomeEyes
GrabSomeEyes

Posts : 29
Join date : 2012-09-08
Age : 26

Back to top Go down

This is not my C Empty Well

Post  Gamer_Mason Tue Oct 09, 2012 8:46 pm

@boxtropica
Oh? Well, that doesn't actually work the same as what I was looking for. WAIT and VSYNCH just halt the program for a time. Pause would hold the program until enter was pressed. Maybe INPUT would be synonymous if I used a dummy variable?

@GrabSomeEyes
No, I just mean I would never open the program for it. Like, ever. :3

Through the last day I've at least gotten through enough BASIC to understand Sporky's Simple Adventure totally. His room loading method sure beats using Arrays, as far as a text adventure goes. It was great for learning how DATA works too.
Gamer_Mason
Gamer_Mason

Posts : 6
Join date : 2012-10-07
Age : 29

Back to top Go down

This is not my C Empty Re: This is not my C

Post  GrabSomeEyes Wed Oct 10, 2012 5:07 pm

Gamer_Mason wrote:No, I just mean I would never open the program for it. Like, ever. :3
... I see...
Well. I actually figured it out, I think I've got an easier form of Visual Basic than I had before, plus a friend happened to explain to me where I could find my programs, so that made it easier.
GrabSomeEyes
GrabSomeEyes

Posts : 29
Join date : 2012-09-08
Age : 26

Back to top Go down

This is not my C Empty Re: This is not my C

Post  boxtropica Wed Oct 10, 2012 9:46 pm

Gamer_Mason wrote:@boxtropica
Oh? Well, that doesn't actually work the same as what I was looking for. WAIT and VSYNCH just halt the program for a time. Pause would hold the program until enter was pressed. Maybe INPUT would be synonymous if I used a dummy variable?

@GrabSomeEyes
No, I just mean I would never open the program for it. Like, ever. :3

Through the last day I've at least gotten through enough BASIC to understand Sporky's Simple Adventure totally. His room loading method sure beats using Arrays, as far as a text adventure goes. It was great for learning how DATA works too.

Oh- you want an Input loop.
It would go like

@loop
b = button()
if (b and 16) goto @continue
goto @loop

@continue
Lalalala

Hope that's what you wanted!
boxtropica
boxtropica
Admin

Posts : 26
Join date : 2012-09-06

https://conlogxl.forumotion.com

Back to top Go down

This is not my C Empty Re: This is not my C

Post  GrabSomeEyes Fri Oct 12, 2012 8:25 pm

boxtropica wrote:
Gamer_Mason wrote:@boxtropica
Oh? Well, that doesn't actually work the same as what I was looking for. WAIT and VSYNCH just halt the program for a time. Pause would hold the program until enter was pressed. Maybe INPUT would be synonymous if I used a dummy variable?

@GrabSomeEyes
No, I just mean I would never open the program for it. Like, ever. :3

Through the last day I've at least gotten through enough BASIC to understand Sporky's Simple Adventure totally. His room loading method sure beats using Arrays, as far as a text adventure goes. It was great for learning how DATA works too.

Oh- you want an Input loop.
It would go like

@loop
b = button()
if (b and 16) goto @continue
goto @loop

@continue
Lalalala

Hope that's what you wanted!
Not saying
B=Button()
If (B and blah blah blah)
Is wrong, but isn't If Button==16, etc. more efficient (one less line of coding overall, but still).
I used your method in Eos, so really I shouldn't be talking, I just felt like suggesting.
GrabSomeEyes
GrabSomeEyes

Posts : 29
Join date : 2012-09-08
Age : 26

Back to top Go down

This is not my C Empty Re: This is not my C

Post  Gamer_Mason Fri Oct 12, 2012 8:56 pm

GrabSomeEyes wrote:
boxtropica wrote:
Gamer_Mason wrote:@boxtropica
Oh? Well, that doesn't actually work the same as what I was looking for. WAIT and VSYNCH just halt the program for a time. Pause would hold the program until enter was pressed. Maybe INPUT would be synonymous if I used a dummy variable?

@GrabSomeEyes
No, I just mean I would never open the program for it. Like, ever. :3

Through the last day I've at least gotten through enough BASIC to understand Sporky's Simple Adventure totally. His room loading method sure beats using Arrays, as far as a text adventure goes. It was great for learning how DATA works too.

Oh- you want an Input loop.
It would go like

@loop
b = button()
if (b and 16) goto @continue
goto @loop

@continue
Lalalala

Hope that's what you wanted!
Not saying
B=Button()
If (B and blah blah blah)
Is wrong, but isn't If Button==16, etc. more efficient (one less line of coding overall, but still).
I used your method in Eos, so really I shouldn't be talking, I just felt like suggesting.

I'm not entirely sure why you use Variable B as opposed to Button(), but it's probably something like defining B first and having later parts of the program read off it being faster than reading Button() each time... ?

There's SOME reason for it out there, I've seen it more than once, and in the preset programs, so that's just what I've been doing most of the time :\
Gamer_Mason
Gamer_Mason

Posts : 6
Join date : 2012-10-07
Age : 29

Back to top Go down

This is not my C Empty Re: This is not my C

Post  GrabSomeEyes Fri Oct 12, 2012 9:00 pm

Well I hope so.
It makes up everything that runs Eos OS, so I really want it to be... the very best coding... like no coding ever was.
GrabSomeEyes
GrabSomeEyes

Posts : 29
Join date : 2012-09-08
Age : 26

Back to top Go down

This is not my C Empty Re: This is not my C

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum