Added Blogposts
This commit is contained in:
5
www/data/blog/Befunge_1/Euler_Problem-01.b93
Normal file
5
www/data/blog/Befunge_1/Euler_Problem-01.b93
Normal file
@@ -0,0 +1,5 @@
|
||||
vvv: < <
|
||||
1> 1+:::3/3*-!#^_>::5/5*-!#^_v
|
||||
1$v ># v# ># v#<
|
||||
1 >:5558***-!|v$<>+\:1-!|v$<
|
||||
>^ <>$$^\ <>.@
|
||||
5
www/data/blog/Befunge_1/Euler_Problem-02.b93
Normal file
5
www/data/blog/Befunge_1/Euler_Problem-02.b93
Normal file
@@ -0,0 +1,5 @@
|
||||
v>v>ppp 0>>$ 10g20g:10p+:v
|
||||
202 >00p0^|-*2/2::< vp02<
|
||||
0::0^+ g00<v**"}P ":<
|
||||
:1>^@$.g00<>*` #v_^
|
||||
>^ ^ <
|
||||
4
www/data/blog/Befunge_1/Euler_Problem-03.b93
Normal file
4
www/data/blog/Befunge_1/Euler_Problem-03.b93
Normal file
@@ -0,0 +1,4 @@
|
||||
89197939490919v >00g10g1-:10p%#v_10g:30p1-40pv
|
||||
v+*29191929891< ^ < <_v#! %g04g03<
|
||||
>*+*+*+*+*+*+*v >"{.i "+**10p#^ #p #0 #0 <>40g:1-40p2-|
|
||||
>#^ +# *# +# *# +# *# +# *# +# <@.g03<
|
||||
6
www/data/blog/Befunge_1/Euler_Problem-04.b93
Normal file
6
www/data/blog/Befunge_1/Euler_Problem-04.b93
Normal file
@@ -0,0 +1,6 @@
|
||||
1:010:pp5558***04p>10g1+::10p04g-00g \#v_1+:00p\$1:10p\:04g- #v_$$03g.@
|
||||
^ v $< >1# 0# 1# p# *# :# v# <
|
||||
v_v#-g1-g20g10g 1g20<p201<v_^#:/+55p10+1g10p1g10%+55: <
|
||||
$ >02g1+:02p 01 g - | > ^
|
||||
> ^ >:03g\`#v_03pv
|
||||
^ $< 0<
|
||||
6
www/data/blog/Befunge_1/Euler_Problem-05.b93
Normal file
6
www/data/blog/Befunge_1/Euler_Problem-05.b93
Normal file
@@ -0,0 +1,6 @@
|
||||
45*00p110p120p >10g20g*10p00g20g1+:20p`#v_10g.@
|
||||
^_v#`g00p03+1:g03 <p031< v <
|
||||
>10g30g% |1 <^ p01/g03g01<
|
||||
>10g30g/40p150p > 20g50g1+:50p` #v_^
|
||||
^ < |!%g05g04 <
|
||||
^<
|
||||
16
www/data/blog/Befunge_1/Euler_Problem-06.b93
Normal file
16
www/data/blog/Befunge_1/Euler_Problem-06.b93
Normal file
@@ -0,0 +1,16 @@
|
||||
"d"10p000p>10g:00g+00p1-:#v_$010p>"c"10g::1+:*\:5:+%\5:+/6+p`#v_ v
|
||||
>$.@ ^ p01< ^ p01+1g01 < 0
|
||||
> v
|
||||
|!:\<|p01-1:g01<$$_v#!:g+6/+:5\%+:5:g01 :< p01"c"+<_v#!p01:-1g01<p01:g0<
|
||||
\ ^< >` > #v_v
|
||||
> v v-g+6/+:5\%+:5:g01< >00g ^
|
||||
##########> ^
|
||||
########## >010g:5:+%\5:+/6+pv
|
||||
##########
|
||||
########## ^ < <
|
||||
##########
|
||||
##########
|
||||
##########
|
||||
##########
|
||||
##########
|
||||
##########
|
||||
156
www/data/blog/Befunge_1/Euler_Problem-07.b93
Normal file
156
www/data/blog/Befunge_1/Euler_Problem-07.b93
Normal file
@@ -0,0 +1,156 @@
|
||||
v // Project Euler - Problem 7
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||
v <
|
||||
>"d"55+*:10p3"2"*:20p*00p230p" ":01p11p10g5:+*1+50pv > 030p 040p>30g1+:30p:10g%\10g/1+g"X"- |
|
||||
v < _^#`g03g00 <|p+1/g01\%g01:g03"0"-p04:+1g04g05<
|
||||
> "X" 30g:10g%\10g/1+p30g >30g+ : 00g\` #v_$>30g1+:30p:10g%\10g/1+g" "- |>30g.@
|
||||
^p+1/g01\%g01:\" ":< ^ <
|
||||
29
www/data/blog/Befunge_1/Euler_Problem-08.b93
Normal file
29
www/data/blog/Befunge_1/Euler_Problem-08.b93
Normal file
@@ -0,0 +1,29 @@
|
||||
"v"00p54*:10p552**:20p*30p85+40p050p060p070p080p >
|
||||
>150g60p>60g:20g%\20g/9+g"0"-*60g1+:60p50g-40g-#v_:80g`#v_$>50g1+:50p30g-#v_ 970p >70g0g.70g8-40g-#v_"=",80g.@
|
||||
^ < ^ <
|
||||
>80p060p>60g50g+:2 0g%\20g /9+g"0"-60g9+0p6 0g1+:60p40g-#v_^
|
||||
^ < ^p07+1g07 <
|
||||
^ <
|
||||
|
||||
|
||||
|
||||
73167176531330624919225119674426574742355349194934
|
||||
96983520312774506326239578318016984801869478851843
|
||||
85861560789112949495459501737958331952853208805511
|
||||
12540698747158523863050715693290963295227443043557
|
||||
66896648950445244523161731856403098711121722383113
|
||||
62229893423380308135336276614282806444486645238749
|
||||
30358907296290491560440772390713810515859307960866
|
||||
70172427121883998797908792274921901699720888093776
|
||||
65727333001053367881220235421809751254540594752243
|
||||
52584907711670556013604839586446706324415722155397
|
||||
53697817977846174064955149290862569321978468622482
|
||||
83972241375657056057490261407972968652414535100474
|
||||
82166370484403199890008895243450658541227588666881
|
||||
16427171479924442928230863465674813919123162824586
|
||||
17866458359124566529476545682848912883142607690042
|
||||
24219022671055626321111109370544217506941658960408
|
||||
07198403850962455444362981230987879927244284909188
|
||||
84580156166097919133875499200524063689912560717606
|
||||
05886116467109405077541002256983155200055935729725
|
||||
71636269561882670428252483600823257530420752963450
|
||||
7
www/data/blog/Befunge_1/Euler_Problem-09.b93
Normal file
7
www/data/blog/Befunge_1/Euler_Problem-09.b93
Normal file
@@ -0,0 +1,7 @@
|
||||
"d"5:+*00p210p> 120p>v >20g1+:20p10g-#v_10g1+:10p00g-#v_ @
|
||||
^ <
|
||||
^ <
|
||||
v <
|
||||
>20g:*10g:*+:30p0>::*30g-#v_:30p20g10g++ 00g-#v_20g:." ",10g:." ",30g:."=",**.@
|
||||
|-g00 :+1<
|
||||
>$$ ^ $<
|
||||
1007
www/data/blog/Befunge_1/Euler_Problem-10.b93
Normal file
1007
www/data/blog/Befunge_1/Euler_Problem-10.b93
Normal file
File diff suppressed because it is too large
Load Diff
31
www/data/blog/Befunge_1/Euler_Problem-11.b93
Normal file
31
www/data/blog/Befunge_1/Euler_Problem-11.b93
Normal file
@@ -0,0 +1,31 @@
|
||||
v v <
|
||||
>"4"2/:*1-00p > 000g: "4"2/ %"?"+\ "4"2/ /1+ p 00g:1-00p #^_v++++++++++++++++++++++++++
|
||||
++++++++++++++++++++++++++
|
||||
++++++++++++++++++++++++++
|
||||
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 | +++####################+++
|
||||
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 | +++####################+++
|
||||
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 | +++####################+++
|
||||
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 | +++####################+++
|
||||
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 | +++####################+++
|
||||
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 | +++####################+++
|
||||
32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 | +++####################+++
|
||||
67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 | +++####################+++
|
||||
24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 | +++####################+++
|
||||
21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 | +++####################+++
|
||||
78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 | +++####################+++
|
||||
16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 | +++####################+++
|
||||
86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 | +++####################+++
|
||||
19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 | +++####################+++
|
||||
04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 | +++####################+++
|
||||
88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 | +++####################+++
|
||||
04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 | +++####################+++
|
||||
20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 | +++####################+++
|
||||
20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 | +++####################+++
|
||||
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48 | +++####################+++
|
||||
vp00-1*:*45 p1++1550p0++1551p1+55-10p0+551p19-10p090 p010<++++++++++++++++++++++++++ >10pv
|
||||
>00g:54*%3*1+\54*/4+g"0"-52**00g:54*%3*2+\54*/4+g"0"-+00g:54*%v++++++++++++++++++++++++++ >$> v
|
||||
| p00-1:g00p+4/*45\+"B"<++++++++++++++++++++++++++ ^_^#`g01:< v <
|
||||
>54*:*1-00p>220p>20g9+:0g30p1g40p00g:54*%50p54*/60p50g"B"+60g4+g50g30g+50p60g40g+60p>50g"B"+60g4+g50g30g+50p60g40g+60pv >20g:1-20p#v_00g:1-00p#^_10g. @
|
||||
^ _^# <vp06+g04g06p05+g03g05g+4g06+"B"g05<^ < v 0<
|
||||
>50g"B"+60g4+g50g30g+50p60g40g+60p***^
|
||||
^ <<
|
||||
@@ -0,0 +1,478 @@
|
||||
TextFunge is the c-like language used for BefunGen.
|
||||
Most constructs are very similar to C and Pascal, so you won't have trouble writing anything in it.
|
||||
|
||||
> *Note:*
|
||||
> TexFunge programs are case-insensitive. *(but please be consistent with your naming)*
|
||||
|
||||
###Program structure
|
||||
|
||||
A TextFunge program starts with the keyword `program` and the program name and ends with `end`
|
||||
|
||||
```textfunge
|
||||
program example_01 : display[0, 0]
|
||||
begin
|
||||
// code
|
||||
end
|
||||
|
||||
void method()
|
||||
begin
|
||||
// code
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
between program` and `end` you can put your methods. The first method has no header and is called the main method.
|
||||
This method is called upon the beginning and when this method has finished the program terminates.
|
||||
|
||||
You can specify a display by writing `: display[width, height]`, if the display is not specified its has a width and height of zero.
|
||||
|
||||
###Types
|
||||
|
||||
TextFunge knows 9 different variable types:
|
||||
|
||||
- Integer: A single integer value
|
||||
- Digit: A single Base-10 digit (integer in the range from `0` to `9` )
|
||||
- Character: A single character
|
||||
- Boolean: A boolean value (`TRUE` or `FALSE`)
|
||||
- Void: Nothing, used for methods that return nothing
|
||||
- Integer Array: An fixed-length array of multiple integer
|
||||
- String: An fixed-length array of multiple character
|
||||
- Digit Array: An fixed-length array of multiple digits
|
||||
- Boolean Array: An fixed-length array of multiple booleans
|
||||
|
||||
```textfunge
|
||||
int a1;
|
||||
integer a2;
|
||||
int[4] a3;
|
||||
|
||||
char b1;
|
||||
character b2;
|
||||
character[4] b3;
|
||||
|
||||
bool c1;
|
||||
boolean c2;
|
||||
bool[4] c3;
|
||||
|
||||
digit d1;
|
||||
digit[4] d2;
|
||||
```
|
||||
|
||||
You can freely cast all value types into each other and all array-types with the same length (see *Casts* for more information)
|
||||
|
||||
###Variables
|
||||
|
||||
Between each method header and the `begin` keyword you can specify local variables under the `var` keyword:
|
||||
|
||||
```textfunge
|
||||
void method()
|
||||
var
|
||||
int var_1, var_2;
|
||||
int var_3 := 77;
|
||||
int[4] var_4 := {0, 1, 1, 0};
|
||||
char[4] var_5 := "FFFF";
|
||||
begin
|
||||
```
|
||||
|
||||
These variables have a local scope and can't be accessed from anywhere else.
|
||||
|
||||
You can also at the beginning of the program specify variables with a global scope
|
||||
|
||||
```textfunge
|
||||
program example_02
|
||||
global
|
||||
int gvar_1, gvar_2;
|
||||
int gvar3;
|
||||
```
|
||||
|
||||
> *Note:*
|
||||
> Global variables (unlike local variables) can **not** have an initializer, they will initially have the value which you specified while compiling.
|
||||
|
||||
To access a variable as whole just write its name, to access an specific array index write the index in square brackets:
|
||||
|
||||
```textfunge
|
||||
var_1[0] = var_2[4 + 1];
|
||||
```
|
||||
|
||||
###Constants
|
||||
|
||||
At the same position as global variables can (global) constants be defined:
|
||||
|
||||
```textfunge
|
||||
program example_02
|
||||
const
|
||||
int VERSION := 14;
|
||||
int COL_BLUE := 0x0000FF;
|
||||
char UNDERSCORE := '_';
|
||||
```
|
||||
|
||||
Be aware that constants are always in the compiled program inlined.
|
||||
So constants are only *syntactical sugar* and result in the same as writing the literal everywhere, where you use the constant.
|
||||
|
||||
> *Note:*
|
||||
> You can only define constants for value types, array constants are not *yet* supported.
|
||||
|
||||
###Literals
|
||||
|
||||
You can specify (Base-10) integer literals by simply writing the number:
|
||||
|
||||
```textfunge
|
||||
0
|
||||
9283
|
||||
-9283
|
||||
```
|
||||
|
||||
And also Base-16 (Hexadecimal) integer literals with `0x`
|
||||
|
||||
```textfunge
|
||||
0x00
|
||||
0xF0F
|
||||
0x123
|
||||
```
|
||||
|
||||
Digit literals have a `#` prefix:
|
||||
|
||||
```textfunge
|
||||
#0
|
||||
#6
|
||||
#9
|
||||
```
|
||||
|
||||
Char literals are surrounded by single ticks:
|
||||
|
||||
```textfunge
|
||||
' '
|
||||
'A'
|
||||
'a'
|
||||
```
|
||||
|
||||
Boolean literals consist of the two boolean keywords:
|
||||
|
||||
```textfunge
|
||||
true
|
||||
false
|
||||
TRUE
|
||||
```
|
||||
|
||||
String literals are surrounded by quotation marks: (Be aware that a string literal is only a shortcut notation of an char array)
|
||||
|
||||
```textfunge
|
||||
""
|
||||
"hello"
|
||||
"hello \r\n second line"
|
||||
```
|
||||
|
||||
And Array literals are the values inside of a set of curly braces:
|
||||
|
||||
```textfunge
|
||||
{0, 1}
|
||||
{'h', 'e', 'l', 'l', 'o'}
|
||||
{true, false, true}
|
||||
```
|
||||
|
||||
###Methods
|
||||
|
||||
Methods consist of 2 parts, the header and the body:
|
||||
|
||||
```textfunge
|
||||
int[9] method(int a, int b, int[9] c)
|
||||
var
|
||||
int var_1 := 0;
|
||||
int var_2;
|
||||
begin
|
||||
// Code
|
||||
// Code
|
||||
// Code
|
||||
|
||||
return c;
|
||||
end
|
||||
```
|
||||
|
||||
In the header you define the return type (value type, array type or `void`),
|
||||
the method name (the normal C naming restriction are valid) and the parameter list (multiple value or array types).
|
||||
|
||||
Then you can (optionally) define local variables.
|
||||
|
||||
And finally between `begin` and `end` you can write your code.
|
||||
|
||||
> *Note:*
|
||||
> Every path of an method must result in an `return` statement.
|
||||
> If the return type is void the compiler can automatically add an return to the end.
|
||||
|
||||
|
||||
###Control Structures
|
||||
|
||||
#### If / Elsif
|
||||
|
||||
```textfunge
|
||||
if (a) then
|
||||
// Code [a == true]
|
||||
elsif (b) then
|
||||
// Code [b == true]
|
||||
elsif (c) then
|
||||
// Code [c == true]
|
||||
else
|
||||
// Code [else]
|
||||
end
|
||||
```
|
||||
|
||||
You can write a branch statement with the keyword `if`.
|
||||
Unlike C you have to write additional `else if`-branches with the keyword `elsif` and you have to end the whole block with `end`
|
||||
|
||||
#### While do
|
||||
|
||||
The `while` loop repeats a statement block until a condition is false
|
||||
|
||||
```textfunge
|
||||
while (running) do
|
||||
// Code
|
||||
end
|
||||
```
|
||||
|
||||
Every loop the condition is evaluated and checked.
|
||||
|
||||
#### Repeat until
|
||||
|
||||
The `repeat until` loop repeats a statement block until a condition is true
|
||||
|
||||
```textfunge
|
||||
while (running) do
|
||||
// Code
|
||||
end
|
||||
```
|
||||
|
||||
The difference to a `while` loop is that the condition is executed at least once.
|
||||
|
||||
#### For
|
||||
|
||||
The `for` loop is a more comfortable loop, because it has an initializer field, a condition field, and a statement field
|
||||
|
||||
```textfunge
|
||||
// (init ; cond ; stmt)
|
||||
for (i = 0; i < 10; i++ ) do
|
||||
// Code
|
||||
end
|
||||
```
|
||||
|
||||
Each field can also be empty, allowing for this simple, infinite loop:
|
||||
|
||||
```textfunge
|
||||
for (;;) do
|
||||
// Code
|
||||
end
|
||||
// <-- unreachable (without goto)
|
||||
```
|
||||
|
||||
#### Switch case
|
||||
|
||||
If you want to distinct multiple values you can use a switch statement:
|
||||
|
||||
```textfunge
|
||||
switch(c)
|
||||
begin
|
||||
case ' ':
|
||||
// Code
|
||||
end
|
||||
case '0':
|
||||
// Code
|
||||
end
|
||||
default:
|
||||
// Else-Code
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
> *Note:*
|
||||
> This is **not** C, there is no fall-through with empty case blocks.
|
||||
|
||||
> *Note:*
|
||||
> Having a lot of cases in a single switch can increase the horizontal size of your program drastically.
|
||||
> Think about using other possibilities in this case
|
||||
|
||||
#### Goto
|
||||
|
||||
```textfunge
|
||||
goto MLBL;
|
||||
out "Nobody sees me";
|
||||
MLBL:
|
||||
out "end";
|
||||
```
|
||||
|
||||
You can define labels by writing the identifier and a colon (instead of a semicolon).
|
||||
And you can write goto statements with the keyword `goto`
|
||||
|
||||
> *Note:*
|
||||
> This is **not** C, you have to end an goto statement with an semicolon, like every other statement too.
|
||||
|
||||
> *Note:*
|
||||
> Use goto's sparely, they are pretty slow and I'm not sure if they are bug-free.
|
||||
|
||||
###Expressions
|
||||
####Mathematical operators
|
||||
|
||||
You can use the normal mathematical operators `+`, `-`, `*`, `/`, `%` (modulo), `(` and `)`.
|
||||
Normal precedence rules apply
|
||||
|
||||
```textfunge
|
||||
a = ((5 + 5)*4 - 10)/-1 % 4;
|
||||
```
|
||||
|
||||
####Boolean operators
|
||||
|
||||
You can use the boolean operators `&&` (AND), `||` (OR), `^` (XOR), `!` (NOT).
|
||||
|
||||
```textfunge
|
||||
a = (10 == x) ^ true;
|
||||
b = !(10 == x);
|
||||
```
|
||||
|
||||
####Comparison
|
||||
|
||||
You can use the normal c-like comparison operators `==`, `!=`, `<`, `>`, `<=` and `>=`
|
||||
|
||||
```textfunge
|
||||
while (a < 100 && a > -100) do
|
||||
a *= 2;
|
||||
end
|
||||
```
|
||||
|
||||
###Special Statements
|
||||
|
||||
####Random
|
||||
|
||||
You can either generate a random boolean value by using `rand`, or a random integer value by using `rand[?]`.
|
||||
|
||||
`rand[n]` generates a random number from [0, 4^n), where 0 is included and 4^n is excluded. So you are only able to set the upper border to results of the formula 4^n.
|
||||
|
||||
```textfunge
|
||||
if (rand) do
|
||||
a = rand[6] % 10;
|
||||
end
|
||||
```
|
||||
|
||||
> *Note:*
|
||||
> Be aware that in the example above not all values are equally distributed (4^6 % 10 != 0), but approximately it is good, and it becomes better with bigger values for n.
|
||||
|
||||
####Quit
|
||||
|
||||
The statement `quit`, `stop` or `close` instantly terminates the program. The main method will always implicitly have an `quit` at the end.
|
||||
|
||||
```textfunge
|
||||
if (error != 0) then
|
||||
out "FATAL ERROR";
|
||||
quit;
|
||||
end
|
||||
```
|
||||
|
||||
####Code block
|
||||
|
||||
You can start everywhere a new code block, it probably wont change the resulting program but has its use in structuring the source code.
|
||||
|
||||
```textfunge
|
||||
// Code
|
||||
begin
|
||||
// Code
|
||||
// Code
|
||||
end
|
||||
// Code
|
||||
```
|
||||
|
||||
####De-/Increment
|
||||
|
||||
With `++` and `--` you can increment/decrement a variable in a shorter way than a assignment.
|
||||
|
||||
```textfunge
|
||||
a++;
|
||||
a = a + 1; // equally
|
||||
```
|
||||
|
||||
####Assignments
|
||||
|
||||
With a single `=` you can assign a value to a variable.
|
||||
|
||||
```textfunge
|
||||
a = 3;
|
||||
b[3] = 0;
|
||||
```
|
||||
|
||||
###Method calls
|
||||
|
||||
Method calls are pretty much like in every other language.
|
||||
|
||||
```textfunge
|
||||
method_1(0, 6, "hello");
|
||||
method_2(getA(), getB(0));
|
||||
```
|
||||
|
||||
###Comments
|
||||
|
||||
You can write either full line comments with `//` or block comments with `/*` and `*/`
|
||||
|
||||
```textfunge
|
||||
/* Comment
|
||||
* Comment
|
||||
*/
|
||||
|
||||
// Comment
|
||||
|
||||
method_99( /* comment */ );
|
||||
```
|
||||
|
||||
###Casts
|
||||
|
||||
TextFunge supports explicit and implicit casting.
|
||||
|
||||
The cases in which implicit casts happen are:
|
||||
|
||||
- `digit` -> `int`
|
||||
- `digit[]` -> `int[]` (with same length)
|
||||
|
||||
You can cast all other value types into each other and array types if they have the same length.
|
||||
|
||||
```textfunge
|
||||
var
|
||||
bool b;
|
||||
int i;
|
||||
char c;
|
||||
begin
|
||||
c = (char)i;
|
||||
b = (bool)c;
|
||||
```
|
||||
|
||||
> *Note:*
|
||||
> When casting no information is lost, so hard casting to an digit can yield to an illegal value.
|
||||
> Also casting something from an boolean does not always result in `0` or `1` (it results in `0` / `not 0`). If you want this you can enable "explicit boolean casting" in the compiler options.
|
||||
|
||||
|
||||
###Input/Output
|
||||
|
||||
####Out
|
||||
|
||||
With the statement `out` you can output either a value or a string:
|
||||
|
||||
```textfunge
|
||||
out 99;
|
||||
out 'a';
|
||||
out "Hello World";
|
||||
out var_1;
|
||||
```
|
||||
|
||||
####OutF
|
||||
|
||||
`Outf` is a shortcut to writing multiple `out` statement. You can give it a comma-separated list of expressions to output
|
||||
|
||||
```textfunge
|
||||
out 99, 'a', "Hello World", var_1;
|
||||
```
|
||||
|
||||
####In
|
||||
|
||||
With the `In` Statement you can ask the user for a value, the input routine differs when you give it a integer variable or a character variable.
|
||||
|
||||
```
|
||||
var
|
||||
int var_1;
|
||||
char var_2;
|
||||
begin
|
||||
in var_1; // Asks for number
|
||||
in var_2; // Asks for character
|
||||
```
|
||||
@@ -22,7 +22,7 @@ It's an IDE in which you can write a program in *TextFunge*, and compile it to v
|
||||
> **NOTE:**
|
||||
>
|
||||
> While the generated Code practically is Befunge-98, you can use it in nearly every Befunge-93 interpreter.
|
||||
> Because it doesn't use a single command, which was not defined in Befunge-93, the only non-Befunge-93 feature is the extended filesize.
|
||||
> Because it doesn't use a single command, which was not defined in Befunge-93, the only non-Befunge-93 feature is the extended file size.
|
||||
> Because this tool can generate fairly big Befunge-93 code, it often exceeds the size of 80x25, and is so no longer totally valid Befunge-93 code.
|
||||
> But for the sake of confusion I will refer in the rest of these documents to it as Befunge-93 code.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user