expand gcc case variable length

daniel@daniel-mint ~/vex $ bash gen.sh 0x10 0x1F
			case 10:
			case 11:
			case 12:
			case 13:
			case 14:
			case 15:
			case 16:
			case 17:
			case 18:
			case 19:
			case 1A:
			case 1B:
			case 1C:
			case 1D:
			case 1E:
			case 1F:
daniel@daniel-mint ~/vex $ cat gen.sh
lower=$(($1))
upper=$(($2))

it=$lower
while [ $it -le $upper ]
do
	printf "\t\t\tcase %2X:\n" $it
	let it=$it+1 
done

  

lower=$(($1))
upper=$(($2))

it=$lower
while [ $it -le $upper ]
do
	printf "\t\t\tcase %2X:\n" $it
	let it=$it+1 
done

  

转载于:https://www.cnblogs.com/long123king/p/3792652.html

你可能感兴趣的:(expand gcc case variable length)