Snowflake in Fig Forth
Author: Mira
Category: Christmas Challenge
System: Atari XL/XE
Language: Forth
Len source code: 367
Len exe file: -
Len code only: -
Instructions:
Copy the source code to clipboard.
Load Fig Forth to Altirra emulator of Atari XL/XL.
In Altirra emulator, open a popup menu (right mouse button click) and select Paste.
The text in the clipboard wil get auto-typed to Fig Forth.
To run the code, type Z and pres Enter (or Return).
Description:
It defines new words a-m, each one outputs one line of the target shape.
Word z aggregates all these - executes a to m in the ascending order and then in the reverse order,
as the shape is symmetric according to horizontal axis.
To save disk space, it defines a few auxiliary words.
s outputs a number of spaces, for example "3 s" outputs 3 spaces.
Words o-y output certain reusable patterns consisting of askerisks and spaces.
a: #
b: # # #
c: # # ### # #
d: ## # ##
e: ### # # # ###
f: # ### #
g: # # #
h: # # # # # # #
l: # # ### # #
m:###################
s:spits out N spaces
o:"*"
p:"***"
t:"* *"
u:"* * *"
v:"* *"
y:"* * *"
Comments:
Thank you for this great competition!