home *** CD-ROM | disk | FTP | other *** search
- <<* MSACALL.INC *>>
- <<#
-
- function GetPrgName( prompt : string ) : string
- string fspec
- begin
- input prompt to fspec
- if fspec
- filespec( fspec,fpath,fname,fext )
- fspec := fpath + fname + '.PRG' <<*Force '.PRG' extension*>>
- end
- RETURN fspec
- end <<*GetPrgName*>>
-
-
- #>>
-
-
- <<function OptionMenu( choice : integer;
- menuhdg : string;
- m0,m1,m2,m3,m4,m5,m6,m7 : string ) : integer>>
- <<#
- integer options
- string pic0,pic1,pic2,pic3,pic4,pic5,pic6,pic7
-
-
- function iftoggle( bitval : integer ) : string <<*nested function*>>
- begin
- if (options and bitval) <> 0 <<*Is the bit set?*>>
- RETURN ' on ' <<*YES*>>
- else
- RETURN ' ── ' <<*NO*>>
- endif
- end iftoggle
-
-
- begin <<*OptionMenu*>>
- options := 0
- repeat
- options := options xor (1 shl (choice-1)) <<*Toggle bit value*>>
- pic0 := iftoggle( 1 )
- pic1 := iftoggle( 2 )
- pic2 := iftoggle( 4 )
- pic3 := iftoggle( 8 )
- pic4 := iftoggle( 16 )
- pic5 := iftoggle( 32 )
- pic6 := iftoggle( 64 )
- pic7 := iftoggle( 128 )
- initmenu( menuhdg )
- pic0 + m0 : 'Press RETURN to select or unselect; ESC finishes'
- pic1 + m1 <<*The above menu message defaults to next options*>>
- pic2 + m2
- pic3 + m3
- pic4 + m4
- pic5 + m5
- pic6 + m6
- pic7 + m7
- end
- menu to choice
- until choice = 0
- RETURN options
- end OptionMenu
-
-
- function SelectGroup : integer
- integer group
- begin
- #>>
- <<group := OptionMenu( 0,'Program Groups to Generate',
- 'All program groups',
- 'MENU file',
- 'PROCEDURE file',
- 'MAIN-OPEN-APPE-EDIT',
- 'BROW-DISP-COND-EXPR-PHRA',
- 'HELP-LABE-PACK-REPO',
- '<user-defined>',
- '<user-defined>'
- )>>
- <<#
- RETURN group
- end SelectGroup
-
-
- function SubMenuType : integer
- integer menutype
- begin
- menutype := 3
- RETURN menutype
- end SubMenuType
-
-
- function MainMenuType : integer
- integer menutype
- begin
- menutype := 2 <<*default*>>
- RETURN menutype
- end MainMenuType
-
-
- procedure GenMainMenu( menutype : integer )
- string fspec
- begin
- fspec := prgpath + fileprefix + '_MBAR.PRG'
- if OpenFile( fspec,'BAR MENU program for ' + datafile + '.DBF' )
- GenLiteBarMenu
- GenFooter( fspec )
- endif
- end <<*GenMainMenu*>>
-
-
- function SelectFeatures : integer
- integer features
- begin
- #>>
- <<features := OptionMenu( 0,'Program Features to Include',
- 'All fields in one Query Table',
- 'Label/Report option in Append/Edit',
- "Browse using Tom Rettig's Library",
- '4th feature (none)',
- '5th feature (none)',
- '6rd feature (none)',
- '7th feature (none)',
- '8th feature (none)'
- )>>
- <<#
- RETURN features
- end SelectFeatures
-
- <<* EOF: MSACALL.INC *>>
- #>>