DEV Community

anup-maharjan
anup-maharjan

Posted on

QBASIC Modular Programming

This code
https://repl.it/@computer2anup/ReverseName
is same like
DECLARE FUNCTION reverse$ (W$)
CLS
INPUT "Enter a name "; W$
PRINT " Reverse name = "; reverse$ (W$)
END

FUNCTION reverse$ (W$)

FOR P = 1 TO LEN(W$)
    C$ = MID$(W$,P,1)
    R$ = C$ + R$
NEXT P

reverse$ = R$

END FUNCTION

But still it lags, why?

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay