-
Notifications
You must be signed in to change notification settings - Fork 0
/
GENBLANK.F
36 lines (28 loc) · 867 Bytes
/
GENBLANK.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
c Utility to generate blank PBMs
c
c Owain Kenway, 2021
program genblank
implicit none
integer n, l
integer m
c Maximum size of simulation in bytes (cells).
parameter (m = 1000000)
character opt*1024, ar*1024, arr(m)
integer w, h
ar = ' '
c Get args via our platform independent wrapper.
call countargs(n)
if (n .ge. 3) then
call getargat(3, ar, l)
call getargat(1, opt, l)
read(opt,*) w
call getargat(2, opt, l)
read(opt,*) h
else
stop 'Invoke with: genblank.exe <w> <h> <filename>'
endif
c Initialise our simulation, load file, draw it.
call cuarr(arr, m)
write(*,*) 'Writing...'
call writepbm(arr, m, w, h, ar)
end