在程序结束时添加
print *, char(7)
原理:char(7) is the bell character. This sounded the bell on the old teletypes. When VDUs came along, the bell was replaced by a beep.
实测win10会产生系统自带的操作提示音。
原网站:https://stackoverflow.com/questions/15960522/generate-sound-beep-in-fortran-90-95
本文介绍如何在Fortran程序中通过打印特殊字符来触发系统声音提示的方法。使用char(7)可以在程序运行结束时产生类似蜂鸣声的效果,这一技巧在Windows 10系统上已得到验证。
2010

被折叠的 条评论
为什么被折叠?



