Subroutines, shared variables, etc.

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Mike Sherwin
Posts: 867
Joined: Fri Aug 21, 2020 1:25 am
Location: Planet Earth, Sol system
Full name: Michael J Sherwin

Re: Subroutines, shared variables, etc.

Post by Mike Sherwin »

Code: Select all

TYPE Search
    sd AS INTEGER ' search depth
    st AS INTEGER ' search time
    ply AS INTEGER
END TYPE    

TYPE Game
    ply AS INTEGER
END TYPE

DIM SHARED search as Search
DIM SHARED game AS Game

' is still global but a way to group similar globals together. 
' so you can have search.ply and game.ply