⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 influenced_yesno.class

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 CLASS
字号:
//                                 influenced_yesno.class
//
//  A yesno that does not always know its own mind.  Allows outside influence
//  in making its decision.  Useful when overloading a yesno from a parent
//  class.
//

*! version 1.0.0  01dec2102

version 8

class {

    instance:
	real_istrue = 0

}, inherit(codestyle)


// ---------------------------------------------------------------------------
// Replace all yesno member programs.  Cannot inherit or we would get the 
// .istrue member variable.

program istrue

	class exit = `.real_istrue'
end

program isfalse

	class exit = ! `.real_istrue'
end


// ---------------------------------------------------------------------------
// Ignore most of the yesno.class member programs, want real_istrue to
// over-ride.

program define set_true
	capture
end

program define set_yes
	capture
end

program define set_on
	capture
end

program define set_false
	capture
end

program define set_no
	capture
end

program define set_off
	capture
end

program define set01
	capture
end

program define set_xor
	capture
end

program define set_swap
	capture
end


// ---------------------------------------------------------------------------

program _unabbrev

	local 0 , `0'

	syntax [ , Yes No On Off True False * ]

	if "`yes'`no'`options'" != "" {
		class exit `"`yes' `no' `options'"'
	}

	if "`on'" != "" {
		class exit "yes"
	}
	if "`off'" != "" {
		class exit "no"
	}
	if "`true'" != "" {
		class exit "yes"
	}
	if "`false'" != "" {
		class exit "no"
	}

end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -