Board logo

标题: [发布]Ritchie Lawrence 批处理函数库中英文版 [打印本页]

作者: HAT     时间: 2008-12-17 17:15    标题: [发布]Ritchie Lawrence 批处理函数库中英文版

Ritchie Lawrence 批处理函数库中英文版
作者: HAT     时间: 2008-12-17

内容简介及版权声明

1、本电子书里面的批处理函数库英文版来源于Ritchie Lawrence,中文版由中国DOS联盟批处理室版主 HAT 翻译;

2、制作本电子书仅以学习和交流为目的,若非原作者许可,一律谢绝任何形式的商业用途;

3、鉴于译者时间、精力、水平所限,如有疏漏之处,敬请读者斧正;

4、本电子书由 HAT 制作,版权归中国DOS联盟论坛所有。

5、欢迎大家前往中国DOS联盟论坛参与讨论。

http://rthost.fam.cx/cndos-up/img/1822.zip

==============================================================================================

[2008-12-19]翻译过程中,发现作者 Ritchie Lawrence 的一处错误,已经发邮件向其询问,并等待回复。

  Quote:
From: bat cndos <cndos.bat@gmail.com>
Date: Dec 19, 2008 3:31 PM
Subject: Error report of the function DateToMins of your Batch Function Library
To: Ritchie Lawrence <ritchie@commandline.co.uk>


Hi Ritchie,

This is HAT from China.

I find there's an error in the function DateToMins of your Batch Function Library.

http://www.commandline.co.uk/lib ... ons/datetomins.html

In the line 2-4 of the Example, you used the same variable m for both of month and minute. This will lead to a wrong result. As your script style, it should be:

@echo off & setlocal ENABLEEXTENSIONS
call :GetDate y m d
call :GetTime h n s t
call :DateToMins %y% %m% %d% %h% %n% mins
echo/Minutes elapsed since 1970-01-01 00:00: %mins%
goto :EOF

Could you please verify and update your Batch Function Library?

I am looking forward to you reply.

Best Regards,
HAT

[2008-12-20]收到的 Ritchie Lawrence 的回复以及确认。

  Quote:
Hi HAT,

Thank you for taking the time to bring the error to my attention. The page has been amended.

Best regards,

--
Ritchie

[2009-02-03]修改中文版GetOS函数中的错误。

感谢 defanive 指出该错误。http://bbs.bathome.cn/viewthread.php?tid=3211#pid20223

[ Last edited by HAT on 2010-3-22 at 21:12 ]
作者: yishanju     时间: 2008-12-17 17:51
太好了,
花了不少时间吧
作者: NeverAgain     时间: 2008-12-17 18:23
plp626发了不少帖子来倡导大家写“函数”,可少有人支持,我看是那些人不热爱bat,没有专业精神。

斑竹能否收集论坛的经典代码,制作bat自己的函数库,作到真正的 代码复用
作者: luckboy45     时间: 2008-12-17 18:52
我不支持谁支持?强烈支持HAT兄!~
作者: HAT     时间: 2008-12-19 16:01
翻译过程中,发现作者 Ritchie Lawrence 的一处错误,已经发邮件向其询问,并等待回复。
作者: kissbill     时间: 2008-12-19 16:14
我只能加2分。
作者: HAT     时间: 2008-12-20 16:51
收到的 Ritchie Lawrence 的回复以及确认。
作者: tg000063     时间: 2008-12-20 23:18
支持!!
作者: pusofalse     时间: 2008-12-21 05:38
突发奇想,批处理能否写“包含文件”呢,在头部加一句类似#include的语句,就可以直接调用其他批文件里面的函数,不必再把函数写在自身当中。。。不过返回值是个问题了~
作者: Helloworld     时间: 2008-12-21 08:44
那我们就需要一个共有的函数库啦?

或许实现后会很强大。
作者: RGB     时间: 2009-1-18 15:07
HAT老大很强悍的说.
收藏.
作者: dejoy     时间: 2009-2-8 00:41    标题: H

HAT老大很强悍的说.
收藏.
作者: qrd8008     时间: 2009-2-8 01:09
强烈支持版主 HAT
作者: heheguai     时间: 2009-2-8 21:03
真的是要强烈应该说发自内心的真诚的强烈的支持HAT兄啊,来dos论坛时间虽然不长,但在这里获得了很多东西,从以前就只知道copy,dir等几个命令到现在 基本上自己动手没问题了,但对批处理函数模块还是很欠缺的!有了这个函数库应该就不难掌握了!!多谢了!
作者: budgerigar     时间: 2009-2-25 21:28
这是个好东西,省了大家好多时间,不得不由衷地感谢一下
作者: xiaoyong12     时间: 2009-3-11 15:31
谢谢!!!!
作者: plikefly     时间: 2009-11-25 16:00
学习了,一直在考虑bat的函数写法,之前也看过一点点。这回彻底了
有个模板了
谢谢啦
作者: tyuooiu     时间: 2009-11-25 21:22
真是个好东西,非常感谢!
作者: applecy     时间: 2009-11-27 18:49
好东西不能不顶。。。
作者: acaigg     时间: 2010-12-28 16:48
强烈支持版主 HAT




欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) Powered by Discuz! 2.5