This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Ideas/Start New Projects => Your Projects
Author Message
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 08 Jun 2007 10:00:23 pm    Post subject:

Attached in this post is my newest five-minute program, that will input any binary 8-bit string, and convert it to its ASCII counterpart. It will continue inputing until the user types in "999". The program wil then display the converted text. There are two programs: prgmBINASCII and prgmBINASC2. The latter includes some unecessary conversions, like the entire lowercase alphabet, and the question and comma.

Well, how do you think I converted HarrierFalcon's spoiler? Very Happy

Optimizations are always welcome. Consult the readme (or me) for any questions.


Last edited by Guest on 08 Jun 2007 10:01:13 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 10:03:11 pm    Post subject:

Wow, you wasted a lot of time...
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 08 Jun 2007 10:06:34 pm    Post subject:

Well, five minutes won't do anything. Razz

Btw, I know that thre are infinite number of sites that have converters, but this is for the people that like to try the hard way. Or that spend almost every minute with their calc Wink
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 10:07:44 pm    Post subject:

frenchcalc1 wrote:
this is for the people that like to try the hard way. Or that spend almost every minute with their calc Wink
[post="107212"]<{POST_SNAPBACK}>[/post]
*glances at the calc he is using to program Metroid Pi with*

Not me Very Happy!
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 08 Jun 2007 10:10:08 pm    Post subject:

Harrierfalcon wrote:
frenchcalc1 wrote:
this is for the people that like to try the hard way. Or that spend almost every minute with their calc Wink
[post="107212"]<{POST_SNAPBACK}>[/post]
*glances at the calc he is using to program Metroid Pi with*
[post="107215"]<{POST_SNAPBACK}>[/post]

*looks at the calc that he spends most of his long summer days with, programming the very buggy Duke Nukem port*

Me neither Very Happy
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 09 Jun 2007 04:57:39 am    Post subject:

Mind if I take a crack at this concept? Smile

Last edited by Guest on 09 Jun 2007 06:35:09 am; edited 1 time in total
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 09 Jun 2007 09:32:36 am    Post subject:

Weregoose wrote:
Mind if I take a crack at this concept? Smile
[post="107237"]<{POST_SNAPBACK}>[/post]

Sure, go ahead! If you find any optimizations (you will, believe me Very Happy ), can you please inform me about them?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 09 Jun 2007 10:04:18 am    Post subject:

Here's what it looks like for single-character inputs:
    [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Input Str1
    sub("[url="http://upload.wikimedia.org/wikipedia/commons/thumb/4/42/ASCII_full.svg/217px-ASCII_full.svg.png"]?[/url]",sum(seq(expr(sub(Str2,8-X,1))2^X,X,0,6))-31,1
For simultaneous conversion of multiple entries:
    [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]" //1 space
    Repeat Str1=". (Type "." and hit Enter to begin conversion)
    Input Str1
    Ans+Str1→Str2
    End
    " //1 space
    For(X,9,length(Str2),8
    Ans+sub("[url="http://upload.wikimedia.org/wikipedia/commons/thumb/4/42/ASCII_full.svg/217px-ASCII_full.svg.png"]?[/url]",sum(seq(expr(sub(Str2,X-Y,1))2^Y,Y,0,6))-31,1
    End
    Ans
Note: I used a diaeresis (ยจ) to get around the limitation concerning quotes within quotes; exchange this
with the apostrophe if you will, but I deem it crucial that the two be distinguished for a truer conversion.

Download: B2ASC.zip


Last edited by Guest on 15 Jun 2007 02:33:42 am; edited 1 time in total
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 09 Jun 2007 07:25:30 pm    Post subject:

Wow Cool I've never seen so many optimizations to a five-minute program before...
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement