This is my thing to post code from my 68k basic version of Suzan.
I will still release a 84+ program, but not yet.
Here is my code. It doesn’t work for some reason, if anyone could help, that would he belpful:
(And if someone could show me how to make it look like pastebin, also helpful)

suzan()
Prgm
Local find,num
Define num(list,i)=Func
Return inString(list,”;”&right(format(i/100000),5))+5
EndFunc
Define find(inpu,lis,maxi)=Func
Local str,a
For i, 1, maxi
num(lis, i)->a
mid(lis,a,inSteing(lis,”;”,a)-a-1)->str
If str=inpu
Return i
EndFor
Return -1
EndFunc

Local in, out
“”->in
While in != “s”
InputStr “>”, in
find(in, ”;00001Hi;00002Duck;”, 2)->out
Disp out
EndWhile

EndPrgm



Thats it. Can anyone tell me what is wrong here?
You could use [code]code[/code].
Ok, so i guess i gotta update....
I am working on the compression algorithm (the real meat of the program).
The idea is, it would take two inputs and outputs that are similar, and smush them together.
For instance...

>I like dogs
Dogs are cool
>I like cats
Cats are cool

Instead of two separate q/a pairs, the algorithm would “smush them together” into

>i like *
* are cool

Of course this example doesn't work in all cases (e.x. “I like food”, but you get the idea)

This algorithm is hell to implement. So yeah, that’s the update!
Suggestion for "I like food":

CHeck for an "S" at the end of the noun. If it does not pick up one, add an "S" at the end of the string


Ex. "I like food"
Get String length -> A
Check for letter s at (last letter of string aka length of string)
If the last letter is not s
foods are cool
else
food(whatever last word of string is) are cool

(This is not optimized at all and most of my string manipulation techniques derive from Scratch 3 but you get the idea)
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement