9.0

204
Instruction: Assign S$ to the substring in strvar starting at Index for Len chars.
Note: A similar function, MidB, returns the Len
bytes starting a byte Index.
Parameter Description (Mid Function)
S$ Copy chars from this string value. If this value is Null then Null is returned.
Index Start copying chars starting at this index value. If the string is not that long then
return a null string.
Len Copy this many chars. If the S$ does not have that many chars starting at Index then
copy the remainder of S$.
Parameter Description (Mid Assignment)
strvar Change part of this string.
Index Change strvar startin
g
at this index value. If the strin
g
is not that lon
g
then it is no
t
changed.
Len The number of chars copied is smallest of: the value of Len, the length of S$ and the
remaining length of strvar.
(
If this value is omitted then the number of chars co
p
ied
is the smallest of: the length of S$ and the remaining length of strvar.)
S$ Copy chars from this string value.
See Also: InStr( ), Left$( ), Len( ), Replace$( ), Right$( ).
Example
Sub Main
S$ = "Hello There"
Mid$(S$,7) = "?????????"
Debug
.Print S$ '"Hello ?????"
Debug
.Print Mid$("Hello",2,1) '"e"
End
Sub
Minute Function
Syntax
Minute(dateexpr)
Group
Time/Date
Description
Return the minute of the hour (0 to 59).
Parameter Description
dateexpr Return the minute of the hour for this date value. If this value is Null then Null is
returned.
See Also: Hour( ), Second( ), Time( ).
Example
Sub Main
Debug
.Print Minute(#12:00:01 AM#) ' 0
End
Sub