String inequality
来源:互联网 发布:如何看待网络暴力 编辑:程序博客网 时间:2024/05/17 12:20
When comparing two strings of different lengths, the comparison is based on the number of characters in the shorter string.
Using this rule, the following examples would be true:
❑ “test” is greater than “boomerang”
❑ “test” is less than “velocity”
1:If the shorter string would be greater than the same number of characters in the longer string, then the shorter string is greater than the longer string.
2:If the shorter string would be less than the same number of characters in the longer string, then the shorter string would be less than the longer string.
:3:If the shorter string is equal to the same number of characters in the longer string, the longer string is greater than the shorter string.
Using this rule, the following examples would be true:
❑ “test” is greater than “boomerang”
❑ “test” is less than “velocity”
❑ “test” is less than “test1”
.section .datastring1:.ascii “test”length1:.int 4string2:.ascii “test1”length2:.int 5.section .text.globl _start_start:noplea string1, %esilea string2, %edimovl length1, %ecxmovl length2, %eaxcmpl %eax, %ecxja longerxchg %ecx, %eaxlonger:cldrepe cmpsbje equaljg greaterless:movl $1, %eaxmovl $255, %ebxint $0x80greater:movl $1, %eaxmovl $1, %ebxint $0x80equal:movl length1, %ecxmovl length2, %eaxcmpl %ecx, %eaxjg greaterjl lessmovl $1, %eaxmovl $0, %ebxint $0x80
阅读全文
0 0
- String inequality
- INEQUALITY PROOF
- Triangle inequality
- H?lder\'s inequality
- Erdos–Mordell inequality
- VC Theory: Hoeffding Inequality
- Inequality of chinese education
- Hoeffding inequality and bound
- Yeahpeng's inequality
- Inequalities - Holder's inequality
- Inequalities - Minkowski's inequality
- Inequalities - Tchebychef's inequality
- An inequality about sine function
- 马尔可夫不等式 Markov's inequality
- Chebyshev-Inequality-with-Linear-Bound
- 机器学习--Hoeffding Inequality--界定概率边界
- Jensen's inequality and KL divergence
- Contest - 2013校赛暨华中邀请赛 Problem D: Tetrahedron Inequality
- linux下查看端口对应的进程号
- asp.net不用服务器控件
- 学习加密算法
- 解决跨域问题
- 1001.Add More Zero
- String inequality
- Ubuntu mirror source modify
- 使用列表渲染wx-for改写新闻列表
- C++之尽可能延后定义式的出现时间(26)---《Effective C++》
- 图片水平垂直居中对齐
- STL中vector/map/set实现原理
- 【C】动态内存开辟(2)——动态内存开辟实例!!!
- Ajax技术--多级联动下拉列表($.ajax())
- Please allow Subclipse team to receive anonymous usage statistics for this Eclipse intance(info)