Extension
Jump to navigation
Jump to search
Extension is an esolang(s) by User:ChuckEsoteric08 to make FakeScript Turing-complete with as small additions as possible
Specification
Version 1
!label and goto commands were deleted. Variables a-z were added and #x would return value of variable x
if [arg1] [arg2]
If [arg1] [arg2] are equal would execute code between this command and matching endif
input [arg1]
Would set variable [arg1] to to user input
set [arg1]
Would concatenate every outputted string and stores result in variable [arg1]. Then clears output
for [arg1]
Start of for loop, and each cycle a character from string [arg1] is printed. Loop stops only when every character from the string is outputed
end
Ends for loop. Note that if and for could be nested
Turing completeness proof of Version 1
Version 1 could be proved Turing complete by this Cyclic Tag interpreter:
input a print ; input b print #b print : set #b for #a set c if #c ; for #b set d if #d ; print 1 set f endif if #d 0 if #f 0 print #e print 0 set e endif print 0 set f endif if #d 1 if #f 0 print #e print 0 set e endif print 0 set f endif end print #e set b print ? set e print 0 set f endif if #c 0 for #b set d if #d ; print 1 set f endif if #d 0 if #f 0 print #e print 0 set e endif if #f 1 print 2 set f endif endif if #d 1 if #f 0 print #e print 0 set e endif if #f 1 print 0 set f endif endif end if #f 0 print #e print 0 set b print ? set e print 0 set f endif if #c 1 for #b set d if #d ; print 1 set f endif if #d 0 if #f 0 print #e print 0 set e endif if #f 1 print 2 set f endif endif if #d 1 if #f 0 print #e print 0 set e endif if #f 1 print 0 set f endif endif end if #f 0 print #e print 1 set b print ? set e print 0 set f endif print #a print #a set a end