Algorithms/Find maximum/vb script method 6
< Algorithms < Find maximum<script type="text/vbscript"> function findMaxFourElement(i_intA,i_intB,i_intC,i_intD) Dim o_intMax o_intMax = i_intA if ( i_intB > o_intMax ) then o_intMax = i_intB end if if ( i_intC > o_intMax ) then o_intMax = i_intC end if if ( i_intD > o_intMax ) then o_intMax = i_intD end if findMaxFourElement = o_intMax end function function findMaxThreeEle(i_intA,i_intB,i_intC) findMaxThreeEle = findMaxFourElement(i_intA,i_intB,i_intC,i_intC) end function Dim result result = findMaxThreeEle(1,2,3) document.write(result) </script>
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.