hi
here is the engine (i have only tested it in DBCLASSIC) :
remstart
this engine is made by: The Nerd
dont steal the code and say that you have made it
this little engine can help you so you can learn more about strings
fell free to use the code in you game or program
remend
`´ okay first we need to make the input so the user can type a word in
`´ to make an input so the user can type a word in the program you just use the INPUT command
`´ after the input you can add a text like this:
`` INPUT "write you name : "
`´ now we need to make the word the user type in to a string you do it like this:
`´INPUT "write you name : ", name$
`´always remember the $ sign so DB knows to handle it as a string
`´ okay know we have this: INPUT "write you name : ", name$
`´ now we need to get a command to manipulate the string for that we use the MID$ command
`´here is what we have:
`´INPUT "write you name : ", name$
`´print mid$(name$, 10)
`´okay you see the (name$, 10) ??? that command let DB know that it take the string name$
`´wich is our users word and take the last letter 10
`´know we do this
`´print mid$(name$, 10)
`´print mid$(name$, 9)
`´print mid$(name$, 8)
`´print mid$(name$, 7)
`´print mid$(name$, 6)
`´print mid$(name$, 5)
`´print mid$(name$, 4)
`´print mid$(name$, 3)
`´print mid$(name$, 2)
`´print mid$(name$, 1)
`´wait key
`´end
remstart
so that lines mean that it can handle up to a word on 10 letters and spell it backwards!
and the commands WAIT KEY and END means that when it have spelled the word backwards it will wait
for a key to be pushed and then quit the program.
now you should try this program and see what that few lines really can do just push the execute button
if you want the program to handle more programs just play around:-)
you just copy a line
and paste it and then you just make it to 11 here is an example:
print mid$(name$, 11)
now the program can handle 11 letters instead of 10.
remend
`` here is the program
input "write you name : ", name$
print mid$(name$, 10)
print mid$(name$, 9)
print mid$(name$, 8)
print mid$(name$, 7)
print mid$(name$, 6)
print mid$(name$, 5)
print mid$(name$, 4)
print mid$(name$, 3)
print mid$(name$, 2)
print mid$(name$, 1)
wait key
end
if you wanna learn something you need to read the instructions(the instructions is in the engine)
please give me some comments about what you think and if the engine have helped you and if you think that i should put it in the codebase.
The Nerd
i make games, i play games... But the fun thing is that i like to make them more than play them....