Posted: 08:57pm 01 May 2024 Copy link to clipboard
Teo1 Newbie
Hi all, From the manual : S$ = " ****23.56700 " PRINT Trim$(s$, " ") I have the error : "Error : TRIM is not declared" What did I do wrong ? Thanks in advance , Teo
Posted: 09:05pm 01 May 2024 Copy link to clipboard
TassyJim Guru
Read the manual just before the example you are quoting
' trim any characters in c$ from the start and end of s$ FUNCTION Trim$(s$, c$) Trim$ = RTrim$(LTrim$(s$, c$), c$) END FUNCTION ' trim any characters in c$ from the end of s$ FUNCTION RTrim$(s$, c$) RTrim$ = s$ DO WHILE INSTR(c$, RIGHT$(RTrim$, 1)) RTrim$ = MID$(RTrim$, 1, LEN(RTrim$) - 1) LOOP END FUNCTION ' trim any characters in c$ from the start of s$ FUNCTION LTrim$(s$, c$) LTrim$ = s$ DO WHILE INSTR(c$, LEFT$(LTrim$, 1)) LTrim$ = MID$(LTrim$, 2) LOOP END FUNCTION
Jim
Posted: 09:32pm 01 May 2024 Copy link to clipboard
Teo1 Newbie
Jim, thanks a lot. It's hard for me because English is not known to me and I'm just starting out with MMBASIC. Teo
Posted: 03:32am 02 May 2024 Copy link to clipboard
NPHighview Senior Member
Teo - you write English much better than any of us write Romanian!