Re: I hope there's a more efficient way of doing this

new topic     » goto parent     » topic index » view thread      » older message » newer message
axtens said...

Bruce, you could eliminate the second column I think...

Then loop through like this:

c = 1 
while x > BlockRanges[c][1] do 
 c+=1 
end while 
c-=1 
result = BlockRanges[c][2] 

Data would look like this:

sequence BlockRanges 
BlockRanges = { 
	{ #0000, "Basic Latin" }, 
	{ #0080, "Latin-1 Supplement" }, 
	{ #0100, "Latin Extended-A" }, 
	{ #0180, "Latin Extended-B" }, 
	{ #0250, "IPA Extensions" }, 
        ... 
	{ #F0000, "Supplementary Private Use Area-A" }, 
	{ #100000, "Supplementary Private Use Area-B" }} 
 

Something like that.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu