BBC BASIC for Windows
IDE and Compiler >> Tools and Utilities >> FNendst() a new tool http://bb4w.conforums.com/index.cgi?board=addins&action=display&num=1482340783 FNendst() a new tool
Post by michael on Dec 21st, 2016, 4:19pm
I couldn't resist making this specialized tool... cus I love using MID$ for strings
I think it makes a nice simple tool
Code:
INPUT "give me a word : ",a$
PRINT "THE last character is"
PRINT "'"+FNendst(a$)+"'"
END
DEFFNendst(st$)
LOCAL la%,res$
la%=LEN(st$)
res$=MID$(a$,la%,1)
=res$
Re: FNendst() a new tool
Post by Zaphod on Dec 21st, 2016, 8:30pm
I take it you don't realize that your new tool is just the same as the built in RIGHT$(a$).