-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path545.html
More file actions
127 lines (127 loc) · 6.62 KB
/
Copy path545.html
File metadata and controls
127 lines (127 loc) · 6.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SmallBASIC | JOIN</title>
<meta name="description" content="Returns the words of the specified string into array 'words'.">
<link rel="canonical" href="545">
<link rel="keywords" href="JOIN words(), delimiters, string">
<link rel="stylesheet" href="/css/style.css">
<link rel="icon" type="image/png" href="/images/sb-desktop-32x32.png">
<script src="/clipboard.js"></script>
</head>
<body>
<button onclick="topFunction()" id="BackToTopBtn" title="Go to top">⯅</button>
<script src="/backtotop.js"></script>
<div class="wrapAll clearfix">
<nav class="navigation">
<div class="logo">
<a href="/"><img src='/images/sb-logo.png?v=2' alt="logo"></a>
</div>
<div class="navlinks">
<a href="/pages/download.html">Download</a>
<a href="/pages/news.html">News</a>
<a href="/pages/community.html">Community</a>
<a href="/pages/articles.html">Resources</a>
<a class='active' href="/pages/reference.html">Language Reference</a>
<a href="/pages/guide.html">SmallBASIC Manual</a>
</div>
</nav>
<div class="mainsection">
<div class="tabs clearfix">
<div class="tabsRight">
<a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/reference/545-string-join.markdown">Edit</a>
<a target="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/reference/545-string-join.markdown">History</a>
</div>
</div>
<div class="article">
<h1>JOIN</h1>
<blockquote>JOIN words, delimiter, s</blockquote>
<div class="siteSub">
<p>
<a href="/">Home</a> >
<a href="/pages/reference.html">Reference</a> >
<a href="/pages/string.html">String</a>
</p>
</div>
<p>Join the elements of the array <code>words</code> with the delimiter
<code>delimiter</code> and return the result as string
<code>s</code>.</p>
<h3 id="example">Example</h3>
<div class="sourceCode" id="cb1"><pre
class="sourceCode smallbasic"><code class="sourceCode smallbasic"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co">' Create an array</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>words << <span class="st">"etc"</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a>words << <span class="st">"temp"</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a>words << <span class="dv">1</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a>words << <span class="st">"filename.ext"</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="co">' Join then array elements</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="fu">JOIN</span> words, <span class="st">"/"</span>, s</span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="kw">PRINT</span> s <span class="co">' Output: etc/temp/1/filename.ext</span></span></code></pre></div>
<div class="lavenderBox">
<div class="header">Code samples using JOIN</div>
<div class="linklist">
<a target="_github" href="https://raw.githubusercontent.com/smallbasic/smallbasic.samples/master/games 3/bolmo.bas">bolmo.bas </a>
<a target="_github" href="https://raw.githubusercontent.com/smallbasic/smallbasic.samples/master/games 1/crow.bas">crow.bas </a>
<a target="_github" href="https://raw.githubusercontent.com/smallbasic/smallbasic.samples/master/network/irc-bot.bas">irc-bot.bas </a>
<a target="_github" href="https://raw.githubusercontent.com/smallbasic/smallbasic.samples/master/games 1/treason.bas">treason.bas </a>
</div>
</div>
<div class="lavenderBox">
<div class="header">String</div>
<div class="linklist">
<a href="/reference/771.html">ASC </a>
<a href="/reference/772.html">BCS </a>
<a href="/reference/773.html">BIN </a>
<a href="/reference/774.html">CBS </a>
<a href="/reference/775.html">CHOP </a>
<a href="/reference/776.html">CHR </a>
<a href="/reference/777.html">DISCLOSE </a>
<a href="/reference/778.html">ENCLOSE </a>
<a href="/reference/779.html">FORMAT </a>
<a href="/reference/780.html">HEX </a>
<a href="/reference/781.html">INSTR </a>
<a href="/reference/545.html"><strong>JOIN</strong> </a>
<a href="/reference/782.html">LCASE </a>
<a href="/reference/783.html">LEFT </a>
<a href="/reference/784.html">LEFTOF </a>
<a href="/reference/785.html">LEFTOFLAST </a>
<a href="/reference/786.html">LOWER </a>
<a href="/reference/787.html">LTRIM </a>
<a href="/reference/788.html">MID </a>
<a href="/reference/789.html">OCT </a>
<a href="/reference/790.html">REPLACE </a>
<a href="/reference/791.html">RIGHT </a>
<a href="/reference/792.html">RIGHTOF </a>
<a href="/reference/793.html">RIGHTOFLAST </a>
<a href="/reference/794.html">RINSTR </a>
<a href="/reference/795.html">RTRIM </a>
<a href="/reference/768.html">SINPUT </a>
<a href="/reference/796.html">SPACE </a>
<a href="/reference/797.html">SPC </a>
<a href="/reference/769.html">SPLIT </a>
<a href="/reference/770.html">SPRINT </a>
<a href="/reference/798.html">SQUEEZE </a>
<a href="/reference/799.html">STR </a>
<a href="/reference/800.html">STRING </a>
<a href="/reference/801.html">TRANSLATE </a>
<a href="/reference/802.html">TRIM </a>
<a href="/reference/803.html">UCASE </a>
<a href="/reference/804.html">UPPER </a>
<a href="/reference/805.html">VAL </a>
</div>
</div>
</div>
<div class="pagefooter">
This page was last edited on Fri, 21 Apr 2023 12:47:09 +0200
|
<a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
processed with
<a href="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 3.1.12.1</a>
</div>
</div>
</div>
</body>
</html>