- UID
- 16779
- 精华
- 0
- 冰点
- 270
- 阅读权限
- 150
- 主题
- 88
- 回帖
- 1975
- 在线时间
- 2735 小时
- 注册时间
- 2014-7-18
- 最后登录
- 2023-2-18
签到天数: 2368 天 [LV.Master]伴坛终老
精灵魔法师☆★
    
- 回帖
- 1975
- 雪点
- 48309
- 阅读权限
- 150
- 在线时间
- 2735 小时
- 注册时间
- 2014-7-18
- 最后登录
- 2023-2-18
|
我唔知你對programming有幾多認識啦, 但如果你自認唔係新手的話, 呢個網你有必要知:
https://searchcode.com/?q=if(version,startswith("windows+9")
以前(可能依家都仲有人) 寫既程式係用 startsWith("Windows 9") 去檢查個 OS 係唔係 Win 9X (95 / 98),
依家佢內部測試時就係發現呢個問題, 所以就避開唔叫Windows 9.
至於你講既Windows 1.0 (198x 年出)既問題根本唔存在, 依家仲邊有
a) 人寫程式會檢查你個OS = Win1 or not
b) 舊時代既程式存在 (講緊20幾近30年前既野黎喔)
c) 20-30年前個programming structure都唔係咁
最後想同你講返, 依家check OS既coding應該係類似咁:
- - IsWindows8Point1OrGreater
复制代码
- - IsWindowsVersionOrGreater(6,3,0)
复制代码
- - //ensure we're on Windows 7 (6.1)
- if (Major > 6) or ((Major = 6) and (Minor >= 1))
- windows7 = true
- else
- windows7 = false;
复制代码
基本上絕大部分都係檢查 NT Kernel Release ver. no. 黎判斷Windows Version既 |
|