Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ztrumpet

Pages: 1 ... 281 282 [283] 284 285 ... 385
4231
Axe / Re: [UPDATE] Speed Order Program
« on: May 17, 2010, 05:06:28 pm »
Let's see, I see one little thing:
If θ=0
could be
!If θ

I'm not the best at optimizing for Axe, so I wouldn't doubt if more optimizations are out there.  Good luck! ;D

4232
Miscellaneous / Re: Birthday Posts
« on: May 17, 2010, 05:02:45 pm »
lol, nice.  Sounds like it was fun. ;D

4233
The Axe Parser Project / Re: Axe Parser
« on: May 17, 2010, 05:00:43 pm »
Those look really nice!  Awesome job! ;D
The 4lvl looks a little choppier.  =/

4234
Miscellaneous / Re: I'm not dead!
« on: May 17, 2010, 04:49:14 pm »
Welcome back Simplethinker!  It's cool that you're back. :D

4235
TI Z80 / Re: Phoenix: Axe Version
« on: May 17, 2010, 04:13:42 pm »
This is awesome!  I like how Raven's turning out! ;D

4236
Computer Programming / My schoolwork got rejected...
« on: May 17, 2010, 04:08:13 pm »
My schoolwork got rejected because it was too complex for my teacher to grade.  I think my Axe and Asm knowledge rubbed off, making my C++ a lot more optimized.  My teacher took one look at it, shook his head, and told me that he wouldn't grade anything that complex.  For those who know C++, you make the call.

My awesome version:
Code: [Select]
#include<fstream.h>
#include<iostream.h>

void main()
{
char string[25], header[50] = "Name     \0Address  \0City     \0State    \0ZIP Code ";
ifstream file_ptr;

int offset = 0;
file_ptr.open("ADDRFILE.DAT",ios::in);
if (file_ptr)
{
do
{
file_ptr.get(string, 25);
file_ptr.ignore(80, '\n');
if (!file_ptr.eof())
cout << header + 10 * offset << ':' << string << '\n';
offset = (offset + 1) % 5;
}
while (!file_ptr.eof());


file_ptr.close();
}
else
cout << "An Error occured!\n";
}

The version I had to turn in:
Code: [Select]
#include<fstream.h>
#include<iostream.h>

void main()
{
char name[25], address[25], city[25], state[25], zip[25];
ifstream file_ptr;

file_ptr.open("ADDRFILE.DAT",ios::in);
if (file_ptr)
{
do
{
file_ptr.get(name, 25);
file_ptr.ignore(80, '\n');
file_ptr.get(address, 25);
file_ptr.ignore(80, '\n');
file_ptr.get(city, 25);
file_ptr.ignore(80, '\n');
file_ptr.get(state, 25);
file_ptr.ignore(80, '\n');
file_ptr.get(zip, 25);
file_ptr.ignore(80, '\n');
if (!file_ptr.eof())
{
cout << "Name: " << name << '\n';
cout << "Address: " << address << '\n';
cout << "City: " << city << '\n';
cout << "State: " << state << '\n';
cout << "ZIP Code: " << zip << '\n';
}
}
while (!file_ptr.eof());


file_ptr.close();
}
else
cout << "An Error occured!\n";
}

Is there a version that's even more optimized?  Feel free to rewrite it if you want... ;D

4237
This is progressing very quickly. :)  I hope Instant Goto will become bug free, as this would speed everyone's Basic coding time up.  :)

4238
Nice job moving stuff. :)

I was unaware Axe was *that* active.  I'm really glad, as it's a revolution.  Thanks for sharing, Quigibo! ;D

4239
Music Showcase / Re: The Everlasting Night
« on: May 16, 2010, 07:20:15 pm »
That's really nice.  Excellent song!  You're pretty good at this. ;D
I like it! :D

4240
Quigibo, thanks!  That really shows why to use SP and it's pretty impressive.  Thank you! :D

4241
Introduce Yourself! / Re: Hi there
« on: May 16, 2010, 06:59:26 pm »
Hi, welcome here!  Instead of the normal peanuts, I'm going to give you a pet! 



Treat your rickroll-lobster nicely, and remember to feed it with peanuts. ;D

4242
Humour and Jokes / Re: Invent an Animal?
« on: May 16, 2010, 06:55:12 pm »
That's perfect.  Just perfection. ;D

4243
Introduce Yourself! / Re: Greetings >_<
« on: May 16, 2010, 06:46:45 pm »
Sorry I'm a little late, but welcome here Hiryu.  It's great to see established members. :)  I really like your sig! ;D

4244
TI-BASIC / Re: Matrix Help
« on: May 16, 2010, 06:23:43 pm »
What does putting the T there do exactly?
T makes the Matrix flip along it's axis of (X,X).  Ex:
[[1, 2][3, 4] T is [[1, 3][2, 4]]
[[1, 2, 3][4, 5, 6]] T is [[1, 4][2, 5][3, 6]]
It's best used for manipulation matrices to use the row commands or Matrix_to_list if desired. :)

4245
General Calculator Help / Re: TI-84 transfering error/crash
« on: May 16, 2010, 06:18:25 pm »
Yea!  I'm glad it works again! ;D

Pages: 1 ... 281 282 [283] 284 285 ... 385