有了解条码的朋友吗?

icevi 2003-09-19 05:13:09
我要写一段程序,要按CODE 128A编码生成一批条形码。在最后要加一个校验位,我不知道这个校验位的算法,查了一下也没查到。

有没有了解的可以提供点资料?

谢了!
...全文
536 14 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
icevi 2003-10-23
  • 打赏
  • 举报
回复
自己找到啦,拿出来共享一下:

1) Initialize a sum variable to the value of your Start code (Start A = 103, Start B = 104, and Start C = 105).
2) Initialize the Weighting value to 1.
3) Starting with the first character in your bar code after the Start code (working from left to right), look up the Value associated with that character and multiply that value by the Weighting value.
4) Increment the Weighting value by 1, and add the result of the calculation above to your sum variable.
5) Repeat this until there is no more data, then divide the sum variable by 103. The remainder from this calculation is the checksum. Convert the Value to a character via Tables 2 - 4.
6) Put the checksum character after your data and end the bar code with the Stop code character (~).
7) Note that both the sum and the checksum variables for any bar code can be displayed by our Bar128 utility program.

谢谢各位!
lvcheng606717 2003-10-22
  • 打赏
  • 举报
回复
以前看过一份完备的文档资料,现在找不到了。
楼上提供的只是模10的效验算法,128码有本身的效验位,其中A,B,C码分别模102,103,104
A码好像多用于记录字符串信息,只能记得这么多了。
icevi 2003-10-22
  • 打赏
  • 举报
回复
谢谢teaism,第一个URL里面128的算法是空白的,第二个URL我知道是不是for code128A的:(
teaism 2003-10-22
  • 打赏
  • 举报
回复
http://www.ancc.org.cn/help/jym.asp
teaism 2003-10-22
  • 打赏
  • 举报
回复
http://www.i-am-best.com/files/1d-barcode29.htm
里面有算法和128码!代参考
icevi 2003-10-22
  • 打赏
  • 举报
回复
晕,真没人知道吗?

我再转回来。
icevi 2003-09-20
  • 打赏
  • 举报
回复
UP一下
icevi 2003-09-19
  • 打赏
  • 举报
回复
应该是不能用水晶报表的,转来算法版看看。
MarcuseXiao 2003-09-19
  • 打赏
  • 举报
回复
水晶表可以,它中间有专用函数
icevi 2003-09-19
  • 打赏
  • 举报
回复
我用的是128A,我就是不知道校验位怎么计算出来的。
riemann413 2003-09-19
  • 打赏
  • 举报
回复
128码后面不是有校验位吗?
你用的是a,b ro c?
Rewiah 2003-09-19
  • 打赏
  • 举报
回复
http://www.playicq.com/dispdocnew.php?t=&id=1462
有delphi原码,不过好像要钱的,我没有下下来看过
icevi 2003-09-19
  • 打赏
  • 举报
回复
我不是要生成图形,是生成数字,然后再用软件去打印的。

刚才又找了一通,还在找ing....
Rewiah 2003-09-19
  • 打赏
  • 举报
回复
自己生成条形码有点麻烦,一般条码打印机都配有字体,CODE 128A应该有的。

11,850

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 非技术版
社区管理员
  • 非技术版社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧