1*b1cdbd2cSJim Jagielski<?xml version="1.0" encoding="UTF-8"?>
2*b1cdbd2cSJim Jagielski
3*b1cdbd2cSJim Jagielski
4*b1cdbd2cSJim Jagielski
5*b1cdbd2cSJim Jagielski<!--***********************************************************
6*b1cdbd2cSJim Jagielski *
7*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
8*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
9*b1cdbd2cSJim Jagielski * distributed with this work for additional information
10*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
11*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
12*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
13*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
14*b1cdbd2cSJim Jagielski *
15*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
16*b1cdbd2cSJim Jagielski *
17*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
18*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
19*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
21*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
22*b1cdbd2cSJim Jagielski * under the License.
23*b1cdbd2cSJim Jagielski *
24*b1cdbd2cSJim Jagielski ***********************************************************-->
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski
28*b1cdbd2cSJim Jagielski
29*b1cdbd2cSJim Jagielski		<helpdocument version="1.0">
30*b1cdbd2cSJim Jagielski<meta>
31*b1cdbd2cSJim Jagielski<topic id="textsbasicshared01030200xml" indexer="include" status="PUBLISH">
32*b1cdbd2cSJim Jagielski<title id="tit" xml-lang="en-US">The Basic Editor</title>
33*b1cdbd2cSJim Jagielski<filename>/text/sbasic/shared/01030200.xhp</filename>
34*b1cdbd2cSJim Jagielski</topic>
35*b1cdbd2cSJim Jagielski</meta>
36*b1cdbd2cSJim Jagielski<body>
37*b1cdbd2cSJim Jagielski<section id="basiceditor">
38*b1cdbd2cSJim Jagielski<bookmark xml-lang="en-US" branch="index" id="bm_id3148647"><bookmark_value>saving;Basic code</bookmark_value>
39*b1cdbd2cSJim Jagielski<bookmark_value>loading;Basic code</bookmark_value>
40*b1cdbd2cSJim Jagielski<bookmark_value>Basic editor</bookmark_value>
41*b1cdbd2cSJim Jagielski<bookmark_value>navigating;in Basic projects</bookmark_value>
42*b1cdbd2cSJim Jagielski<bookmark_value>long lines;in Basic editor</bookmark_value>
43*b1cdbd2cSJim Jagielski<bookmark_value>lines of text;in Basic editor</bookmark_value>
44*b1cdbd2cSJim Jagielski<bookmark_value>continuation;long lines in editor</bookmark_value>
45*b1cdbd2cSJim Jagielski</bookmark><comment>mw deleted "Basic;"</comment><paragraph role="heading" id="hd_id3147264" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/sbasic/shared/01030200.xhp" name="The Basic Editor">The Basic Editor</link></paragraph>
46*b1cdbd2cSJim Jagielski</section>
47*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3145069" xml-lang="en-US" l10n="U" oldref="3">The Basic Editor provides the standard editing functions you are familiar with when working in a text document. It supports the functions of the <emph>Edit</emph> menu (Cut, Delete, Paste), the ability to select text with the Shift key, as well as cursor positioning functions (for example, moving from word to word with <switchinline select="sys"><caseinline select="MAC">Command</caseinline><defaultinline>Ctrl</defaultinline></switchinline> and the arrow keys).</paragraph>
48*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154686" xml-lang="en-US" l10n="CHG" oldref="31">Long lines can be split into several parts by inserting a space and an underline character _ as the last two characters of a line. This connects the line with the following line to one logical line. (If "Option Compatible" is used in the same Basic module, the line continuation feature is also valid for comment lines.)</paragraph>
49*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3151042" xml-lang="en-US" l10n="CHG" oldref="32">If you press the <emph>Run BASIC</emph> icon on the <emph>Macro</emph> bar, program execution starts at the first line of the Basic editor. The program executes the first Sub or Function and then program execution stops. The "Sub Main" does not take precedence on program execution.</paragraph>
50*b1cdbd2cSJim Jagielski<paragraph role="tip" id="par_id59816" xml-lang="en-US" l10n="NEW">Insert your Basic code between the Sub Main and End Sub lines that you see when you first open the IDE. Alternatively, delete all lines and then enter your own Basic code.</paragraph>
51*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3125863" xml-lang="en-US" level="2" l10n="U" oldref="4">Navigating in a Project</paragraph>
52*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3145785" xml-lang="en-US" level="3" l10n="U" oldref="6">The Library List</paragraph>
53*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3146120" xml-lang="en-US" l10n="U" oldref="7">Select a library from the <emph>Library</emph> list at the left of the toolbar to load the library in the editor. The first module of the selected library will be displayed.</paragraph>
54*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3153190" xml-lang="en-US" level="3" l10n="U" oldref="8">The Object Catalog</paragraph>
55*b1cdbd2cSJim Jagielski<embed href="text/sbasic/shared/01020200.xhp#object_catalog"/>
56*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3148647" xml-lang="en-US" level="2" l10n="U" oldref="15">Saving and Loading Basic Source Code</paragraph>
57*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3154320" xml-lang="en-US" l10n="U" oldref="16">You can save Basic code in a text file for saving and importing in other programming systems.</paragraph>
58*b1cdbd2cSJim Jagielski<paragraph role="warning" id="par_id3149959" xml-lang="en-US" l10n="U" oldref="25">You cannot save Basic dialogs to a text file.</paragraph>
59*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3149403" xml-lang="en-US" level="3" l10n="U" oldref="17">Saving Source Code to a Text File</paragraph>
60*b1cdbd2cSJim Jagielski<list type="ordered">
61*b1cdbd2cSJim Jagielski<listitem>
62*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3150327" xml-lang="en-US" l10n="U" oldref="18">Select the module that you want to export as text from the object catalog.</paragraph>
63*b1cdbd2cSJim Jagielski</listitem>
64*b1cdbd2cSJim Jagielski<listitem>
65*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3150752" xml-lang="en-US" l10n="U" oldref="19">Click the <emph>Save Source As</emph> icon in the Macro toolbar.</paragraph>
66*b1cdbd2cSJim Jagielski</listitem>
67*b1cdbd2cSJim Jagielski<listitem>
68*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3154754" xml-lang="en-US" l10n="U" oldref="20">Select a file name and click <emph>OK</emph> to save the file.</paragraph>
69*b1cdbd2cSJim Jagielski</listitem>
70*b1cdbd2cSJim Jagielski</list>
71*b1cdbd2cSJim Jagielski<paragraph role="heading" id="hd_id3159264" xml-lang="en-US" level="3" l10n="U" oldref="21">Loading Source Code From a Text File</paragraph>
72*b1cdbd2cSJim Jagielski<list type="ordered">
73*b1cdbd2cSJim Jagielski<listitem>
74*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3147343" xml-lang="en-US" l10n="U" oldref="22">Select the module where you want to import the source code from the object catalog.</paragraph>
75*b1cdbd2cSJim Jagielski</listitem>
76*b1cdbd2cSJim Jagielski<listitem>
77*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3145230" xml-lang="en-US" l10n="U" oldref="23">Position the cursor where you want to insert the program code.</paragraph>
78*b1cdbd2cSJim Jagielski</listitem>
79*b1cdbd2cSJim Jagielski<listitem>
80*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3149565" xml-lang="en-US" l10n="U" oldref="24">Click the <emph>Insert Source Text</emph> icon in the Macro toolbar.</paragraph>
81*b1cdbd2cSJim Jagielski</listitem>
82*b1cdbd2cSJim Jagielski<listitem>
83*b1cdbd2cSJim Jagielski<paragraph role="listitem" id="par_id3154020" xml-lang="en-US" l10n="U" oldref="33">Select the text file containing the source code and click <emph>OK</emph>.</paragraph>
84*b1cdbd2cSJim Jagielski</listitem>
85*b1cdbd2cSJim Jagielski</list>
86*b1cdbd2cSJim Jagielski<section id="relatedtopics">
87*b1cdbd2cSJim Jagielski<paragraph role="paragraph" id="par_id3153198" xml-lang="en-US" l10n="U" oldref="29"><link href="text/sbasic/shared/01050000.xhp" name="Basic IDE">Basic IDE</link></paragraph>
88*b1cdbd2cSJim Jagielski<embed href="text/sbasic/shared/01020200.xhp#01020200"/>
89*b1cdbd2cSJim Jagielski</section>
90*b1cdbd2cSJim Jagielski</body>
91*b1cdbd2cSJim Jagielski</helpdocument>
92