Mirage Source
http://www.miragesource.net/forums/

aLen use?
http://www.miragesource.net/forums/viewtopic.php?f=201&t=1163
Page 1 of 40

Author:  Shannara [ Sun Jan 14, 2007 7:42 pm ]
Post subject:  aLen use?

Been looking through some sources, alen is being a pos, even though instructions followed .. bah ...

Code:
Public Function aLen(ByRef dBytes() As Byte) As Long
    On Error Resume Next
   
    aLen = (UBound(dBytes) - LBound(dBytes)) + 1
 
    If Err.Number <> 0 Then
      aLen = 0
      Err.Clear
    End If
End Function


Use would be ...

Code:
Dim Buffer() as byte

Erase Buffer
Buffer = ""
Buffer = AddByteToBuffer(Buffer, 1)


The above always result in a runtime error ... now according to the instructions :

Quote:
'One thing to note, always initialize your byte array to "".
'i.e. dBytes = ""
'This sets the UBound of the byte array to -1, allowing us
'to have a size of 0. If the array is not initialized, or
'you have emptied the array, aLen will cause a RT error.


Doesn't seem to be accurate. As shown by the code above, I shouldn't receive a runtime error.

Author:  Obsidian [ Sun Jan 14, 2007 7:57 pm ]
Post subject: 

yeah i had that same problem. It's weird, but when i quit using "Erase Buffer", the error went away...

Author:  Shannara [ Sun Jan 14, 2007 8:00 pm ]
Post subject: 

Perfect, thanks

Author:  Obsidian [ Sun Jan 14, 2007 8:11 pm ]
Post subject: 

Are you rewriting ver's tutorial and/or releasing a code with working byte arrays?

Author:  Shannara [ Sun Jan 14, 2007 8:28 pm ]
Post subject: 

Im shifting through the Kingdom of Cryshall code as well as the VBGore code :) To answer your question, I'm using Socket Tools for my project, and figured i'd try out the byte based networking route for this bugger.

I'm create a few classed for use with Socket Tools and the networking. Once I am finished with the conversion, I'm looking at releasing the classes and tutorial on how to use the classes on this forum.

Author:  Spodi [ Sun Jan 14, 2007 10:15 pm ]
Post subject: 

I just store a separate variable that keeps track of the array UBound(), this way you don't have to call for the UBound() along with don't have to worry about the array not existing (UBound returning an error). When you erase the array, you just set your UBound variable to -1. I would presume erasing is faster then redimming 0 since theres no memory it has to try and preserve, along with you free up that last index.

Author:  grimsk8ter11 [ Mon Jan 15, 2007 2:26 am ]
Post subject: 

Shan you cant set buffer =" " has to be buffer = ""

Author:  Lea [ Mon Jan 15, 2007 4:31 am ]
Post subject: 

You don't need to do Buffer="" for some things. If I remember correctly, if the packet has a string in it you need to do it. Haven't messed with it for a while, and instead of testing each packet it's easier to just include that lien.

Author:  grimsk8ter11 [ Mon Jan 15, 2007 3:58 pm ]
Post subject: 

Dave wrote:
You don't need to do Buffer="" for some things. If I remember correctly, if the packet has a string in it you need to do it. Haven't messed with it for a while, and instead of testing each packet it's easier to just include that lien.


iw as jsut saying, since shan posted it as Buffer=" ", i believe its only used once.

Author:  Matt [ Mon Jan 15, 2007 4:14 pm ]
Post subject: 

I was talking to Shan about that last night, he said he fixed that issue long ago. Lol.

Author:  wanai [ Wed Dec 01, 2021 1:21 pm ]
Post subject:  Re: aLen use?

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruhttp://hackworker.ruhttp://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.ruhttp://labourearnings.ruhttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruинфоhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.rutaskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruсайтhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru

Author:  wanai [ Mon Jan 31, 2022 1:24 pm ]
Post subject:  Re: aLen use?

Crea

Author:  wanai [ Mon Jan 31, 2022 1:25 pm ]
Post subject:  Re: aLen use?

202.92

Author:  wanai [ Mon Jan 31, 2022 1:26 pm ]
Post subject:  Re: aLen use?

PERF

Author:  wanai [ Mon Jan 31, 2022 1:27 pm ]
Post subject:  Re: aLen use?

PERF

Author:  wanai [ Mon Jan 31, 2022 1:28 pm ]
Post subject:  Re: aLen use?

Juli

Author:  wanai [ Mon Jan 31, 2022 1:29 pm ]
Post subject:  Re: aLen use?

Heat

Author:  wanai [ Mon Jan 31, 2022 1:31 pm ]
Post subject:  Re: aLen use?

Miss

Author:  wanai [ Mon Jan 31, 2022 1:32 pm ]
Post subject:  Re: aLen use?

Yash

Author:  wanai [ Mon Jan 31, 2022 1:33 pm ]
Post subject:  Re: aLen use?

Esma

Author:  wanai [ Mon Jan 31, 2022 1:34 pm ]
Post subject:  Re: aLen use?

OZON

Author:  wanai [ Mon Jan 31, 2022 1:35 pm ]
Post subject:  Re: aLen use?

John

Author:  wanai [ Mon Jan 31, 2022 1:36 pm ]
Post subject:  Re: aLen use?

Atta

Author:  wanai [ Mon Jan 31, 2022 1:37 pm ]
Post subject:  Re: aLen use?

Deko

Author:  wanai [ Mon Jan 31, 2022 1:38 pm ]
Post subject:  Re: aLen use?

Fisk

Page 1 of 40 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/