13.07.2015 Views

Macro Guide - Esker

Macro Guide - Esker

Macro Guide - Esker

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sub...End SubDescriptionReturns a string of length number consisting of a repetition of the specified filler character. String$returns a String, whereas String returns a String variant. These functions take the following namedparameters:ParameternumberCharacterDescriptionInteger specifying the number of repetitions.Integer specifying the character code to be used as the filler character. If character isgreater than 255 (the largest character value), then the compiler converts it to a validcharacter using the following formula: character Mod 256. If character is a string,then the first character of that string is used as the filler character.ExampleConst crlf = Chr$(13) + Chr$(10)Sub Maina$ = "This string will appear underlined."b$ = String$(Len(a$),"=")Session.Echo a$ & crlf & b$End SubSee Also Character and String Manipulation on page 2Sub...End SubSyntax[Private | Public] [Static] Sub name[(arglist)][statements]End Subwhere arglist is a comma-separated list of the following (up to 30 arguments are allowed):[Optional] [ByVal | ByRef] parameter[()] [As type]Note that a comment line must immediately follow the initial Sub line. This line is intended to identifywho created the macro and when. The comment line format is:'! <strong>Macro</strong> created by name on date.You must at least include a '! line.DescriptionDeclares a subroutine. The Sub statement has the following parts:PartPrivatePublicStaticDescriptionIndicates that the subroutine being defined cannot be called from other macros in othermodules.Indicates that the subroutine being defined can be called from other macros in othermodules. If the Private and Public keywords are both missing, then Public is assumed.Recognized by the compiler but currently has no effect.472

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!