Simpler?
_TITLE "All Digits Multiplication B+ mod of Galileo 2019-01-25"
'// Display all multiplications of two numbers such that,
' between the multiplicants and the result are represented once and only once each digit in the decimal system.
'// Developed in Yabasic by Galileo, 01/2019
FOR a = 1 TO 99
FOR b = 1 TO 9999
IF haveAllDigits(LTRIM$(STR$(a)) + LTRIM$(STR$(b)) + LTRIM$(STR$(a * b))) = -1 AND a < b THEN PRINT a, " * ", b, " = ", a * b
NEXT
NEXT
FUNCTION haveAllDigits (a$)
IF LEN(a$) <> 10 THEN EXIT FUNCTION
allDigits$ = "0123456789"
FOR i = 1 TO LEN(a$)
p = INSTR(allDigits$, MID$(a$, i, 1))
IF p THEN allDigits$ = MID$(allDigits$, 1, p - 1) + MID$(allDigits$, p + 1) ELSE EXIT FUNCTION
NEXT
haveAllDigits = -1
END FUNCTION