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)