Mark Alexander Bain's BlogPosted by Mark Alexander Bain There is no direct way to work out how many arrays there are in a VBScript multidimension array, however a simple VBScript function will do the job: Function dimensions (inarray) On Error Resume Next Dim dims: dims = 0 Dim dim_check Dim i: For i = 1 to 32 dim_check = ubound(inarray, i) If Err.Number = 0 Then dims = dims + 1 End If Next dimensions = dims End Function There's more on VBScript multidimensional arrays in Using Multidimensional Arrays with VBScript: How to Work with More than One Dimension in VBScript Programming. Posted by Mark Alexander Bain I've been a long time fan of Notepad++, in fact I've just used it for the Javascript coding for An Introduction to Dynamic HTML with Javascript; however, I've always felt it's been lacking one thing - a word count. Turns out that I've just been looking in the wrong place. To carry out a word count in Notepad++:
and that's all there is to it. Now if I could just get Notepad++ to work on my Jornada 720....
Posted by Mark Alexander Bain Well, that's my first day as the Computer Programming Feature Writer over and done with; and how much writing have I done? Absolutely none. Why? Because the MOT (the UK's Ministry of Transport annual test certificate) is due on my kit car - a 2.6 V6 Eagle Jeep. So instead of writing I've become a expert on hazard warning lights (which had stopped working). The symptoms were quite simple:
The cabling, engine and gearbox for the Eagle Jeep are from 1971 Ford Granada, and as such the hazard warning lights are quite simple:
And, after most of the day trying to follow the wiring I was none the wiser; which is when Maplin came to the rescue - a quick trip into Peterborough, and an hour and £14.99 later I had a brand new Maplin's multimeter; and ten minutes after that I found that the permanent live for the switch wasn't actually permanent. Which just goes to show - save yourself a lot of time and effort by making sure that you have the right tools at hand. So, it's not been a Computer Programming day, but at least it's been a technological one. |