English 中文(简体)
在监督事务司/Batch,8个不足1个,但7个以上。 为什么?
原标题:08 is less than 1, but 07 is greater than 1 in DOS/Batch. Why?

在监督事务司/部门,

if 08 lss 1 echo true

重复“真实”。 这也适用于09。 8和9两者都少于1。

然而,

if 07 lss 1 echo true

没有任何内容。 页: 1

为什么? 什么是特别的,大约是08和09?

最佳回答

通常情况下,领先的<代码>0 页: 1 I d 预期0809 实际为err;或许批量语言没有很好的机制表示投入不正确?

问题回答

扩大已经提供的答复......

我从未看到过任何文件,这些文件表明,国际红十字与红新月联会支持oc或hexa计。 但是,你的问题促使我做了一些测试,实际上它确实支持SET/A所支持的同样的数字说法。

  • Any set of digits [0-9] not starting with 0 is interpreted as decimal.
  • Any set of digits [0-7] prefixed with 0 is interpreted as octal.
  • Any set of digits [0-9,A-F,a-f] prefixed with 0x or 0X is interpreted as hexadecimal.

任何不符合上述3个数字标注的特性,均视为示意图。

如果比较的双方都是有效的数字,则进行数字比较。

如果任何一方都不是有效数目,则进行严格比较。

07年是一种有效的职业标志,其数值为7,不少于1。

第8和第9条预先规定为0,但无效的居住通知,因此进行了细微比较。 任何从0开始的扼杀行为,都将少于从1起的扼杀。

有一些令人感兴趣的检验,以证实胎儿和六dec的脱硫得到了支持。

if 0xA equ 10 echo ok
if 011 equ 9 echo ok

很有趣的是,在SET/A声明中,无效的oc或hexa声引起错误。 但是,在国际联合会的发言中,无效的oc或六dec的 not声不会产生错误。 它只是要进行细微的比较。

<><>Update

有效编号之前,可加指示数:

if +0xA equ +10 echo ok
if -011 equ -9 echo ok

8和9是非法的。 在职业中,7名是最高法律数。 一位零位的主数表示,有数位数为中位数。





相关问题
Find the closest time from a list of times

So, here s the scenario. I have a file with a created time, and I want to choose a time from a list of times that that file s created time is closest or equal too...what would be the best way to ...

PHP Comparison Operators and Data Types

I m currently working through O Reilly s "Programming PHP" and have come across this table titled "Type of comparison performed by the comparison operators": First Operand | Second ...

Loop Until Condition Reached, iPhone

I have a problem here... After a button is pressed I want a loop to run until a condition is reached: - (IBAction)buttonclick1 ... if ((value2ForIf - valueForIf) >= 3) { ... I would like a loop ...

nuSoap or Zend Soap? [closed]

I would like to know the differences between nusoap and ZendSoap, which is the best? what benefits and disadvantages of each? Anyone who has used both technologies could make this comparison? Thank ...

Logic for a file compare

I trying to write a programm for file compare. For example: file1 1 2 3 4 5 file2 1 2 @ 3 4 5 If I do it line by line, I get: 1 == 1; 2 == 2; 3 != @; 4 != 3; 5 != 4; != 5; But, the truth is ...

热门标签