Converting ISBN-10 to ISBN-13

function isbn10toisbn13(isbn10)
	dim isbnARR(9)
		for i = 0 to 9
			isbnARR(i) = cint(mid(isbn10,i+1,1))
		next

	a = 9
	b = 7
	c = 8
	d = isbnARR(0)
	e = isbnARR(1)
	f = isbnARR(2)
	g = isbnARR(3)
	h = isbnARR(4)
	i = isbnARR(5)
	j = isbnARR(6)
	k = isbnARR(7)
	l = isbnARR(8)
	m = isbnARR(9)
	
	
	n = (a*1)+(b*3)+(c*1)+(d*3)+(e*1)+(f*3)+(g*1)+(h*3)+(i*1)+(j*3)+(k*1)+(l*3)
	o = 10-(n mod 10)
	isbn10toisbn13 = cstr("978" & left(isbn10,9) & o)
end function

Comments


Comments Disabled For Now

 

 







LATEST POSTS

Viewstate bad developer, bad. Animation != Application Frame-based illiteration engulfs world. Developers worldwide cry. Handy ASP.NET Routines Bullshit Talks But money wont shut the hell up. PostBackUrl Equals Change the Friggin' Form Action .

ADS

MOST POPULAR

Multiple IEs in Windows Firefox Vs. The World Who Is Xperya? ActionScript Form Fields Quick Watermark IE 7 beta 2 standalone

IP Address Tool Chicago Web Design Free Text Messaging