Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Futurebasic/Language/Reference/MID function

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

MID$ and MID$$ Syntax subString$ = MID$(string$,startPos [,numChars]) subContainer$$ = MID$$(container$$,startPos [,numChars]) Revised June 15, 2000 (Release 3) Description This function returns a substring or subcontainer of string$ or container$$, consisting of characters which begin at position startPos within string$ or container$$. If you specify numChars, then a maximum of numChars characters are returned; otherwise, all the characters from startPos to the end of string$ or container$$ are returned. If startPos is less than 1, then it's treated as 1. If startPos is greater than the length of string$ or container$$, then a null (zero-length) string is returned. Note: You may not use complex expressions that include containers on the right side of the equal sign. Instead of using: c$$ = c$$ + MID$$(a$$,10) Use: c$$ += MID$$(a$$,10) Example: PRINT MID$("Rick Brown", 2, 3) myContainer$$ = "Rick Brown" PRINT MID$(myContainer$$, 2, 3) PRINT MID$("Rick Brown", 6) program output: ick ick Brown See Also MID$ statement; LEFT$; RIGHT$; INSTR