How to resolve the algorithm Pinstripe/Display step by step in the Liberty BASIC programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Pinstripe/Display step by step in the Liberty BASIC programming language
Table of Contents
Problem Statement
The task is to demonstrate the creation of a series of vertical pinstripes across the entire width of the display.
c.f. Colour_pinstripe/Display
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Pinstripe/Display step by step in the Liberty BASIC programming language
Source code in the liberty programming language
nomainwin
UpperLeftX=1
UpperLeftY=1
WindowWidth=DisplayWidth
WindowHeight=DisplayHeight
graphicbox #gr.gr, -1, -1, DisplayWidth+4, DisplayHeight+1
open "Pinstripe/Display" for window_popup as #gr
#gr.gr "down"
#gr.gr "trapclose [quit]"
#gr.gr "color black"
#gr.gr "backcolor black"
for w = 1 to 4
y1=y2
y2=y1+DisplayHeight/4
for x = w to DisplayWidth+4 step w*2
#gr.gr "place ";x;" ";y1;"; boxfilled ";x+w;" ";y2
next
next
wait
[quit]
close #gr
end
You may also check:How to resolve the algorithm Eertree step by step in the zkl programming language
You may also check:How to resolve the algorithm Pascal matrix generation step by step in the Lua programming language
You may also check:How to resolve the algorithm Time a function step by step in the Seed7 programming language
You may also check:How to resolve the algorithm EKG sequence convergence step by step in the J programming language
You may also check:How to resolve the algorithm Lah numbers step by step in the R programming language