1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir 3d33d0967SAndrew Rist<!--*********************************************************** 4cdf0e10cSrcweir * 5d33d0967SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 6d33d0967SAndrew Rist * or more contributor license agreements. See the NOTICE file 7d33d0967SAndrew Rist * distributed with this work for additional information 8d33d0967SAndrew Rist * regarding copyright ownership. The ASF licenses this file 9d33d0967SAndrew Rist * to you under the Apache License, Version 2.0 (the 10d33d0967SAndrew Rist * "License"); you may not use this file except in compliance 11d33d0967SAndrew Rist * with the License. You may obtain a copy of the License at 12cdf0e10cSrcweir * 13d33d0967SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 14cdf0e10cSrcweir * 15d33d0967SAndrew Rist * Unless required by applicable law or agreed to in writing, 16d33d0967SAndrew Rist * software distributed under the License is distributed on an 17d33d0967SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18d33d0967SAndrew Rist * KIND, either express or implied. See the License for the 19d33d0967SAndrew Rist * specific language governing permissions and limitations 20d33d0967SAndrew Rist * under the License. 21cdf0e10cSrcweir * 22d33d0967SAndrew Rist ***********************************************************--> 23d33d0967SAndrew Rist 24cdf0e10cSrcweir<helpdocument version="1.0"> 25cdf0e10cSrcweir<meta> 26cdf0e10cSrcweir<topic id="textsbasicshared01030200xml" indexer="include" status="PUBLISH"> 27cdf0e10cSrcweir<title id="tit" xml-lang="en-US">The Basic Editor</title> 28cdf0e10cSrcweir<filename>/text/sbasic/shared/01030200.xhp</filename> 29cdf0e10cSrcweir</topic> 30cdf0e10cSrcweir</meta> 31cdf0e10cSrcweir<body> 32cdf0e10cSrcweir<section id="basiceditor"> 335b00253eSmseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3148647"> 345b00253eSmseidel<bookmark_value>saving;Basic code</bookmark_value> 35cdf0e10cSrcweir<bookmark_value>loading;Basic code</bookmark_value> 36cdf0e10cSrcweir<bookmark_value>Basic editor</bookmark_value> 37cdf0e10cSrcweir<bookmark_value>navigating;in Basic projects</bookmark_value> 38cdf0e10cSrcweir<bookmark_value>long lines;in Basic editor</bookmark_value> 39cdf0e10cSrcweir<bookmark_value>lines of text;in Basic editor</bookmark_value> 40cdf0e10cSrcweir<bookmark_value>continuation;long lines in editor</bookmark_value> 41d0ab5cd3Smseidel</bookmark><comment>mw deleted "Basic;"</comment> 42*c408df06Smseidel<paragraph role="heading" id="hd_id3147264" xml-lang="en-US" level="1" l10n="U"><link href="text/sbasic/shared/01030200.xhp" name="The Basic Editor">The Basic Editor</link></paragraph> 43cdf0e10cSrcweir</section> 44*c408df06Smseidel<paragraph role="paragraph" id="par_id3145069" xml-lang="en-US" l10n="U">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> 45*c408df06Smseidel<paragraph role="paragraph" id="par_id3154686" xml-lang="en-US" l10n="CHG">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> 46*c408df06Smseidel<paragraph role="paragraph" id="par_id3151042" xml-lang="en-US" l10n="CHG">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> 47cdf0e10cSrcweir<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> 48*c408df06Smseidel<paragraph role="heading" id="hd_id3125863" xml-lang="en-US" level="2" l10n="U">Navigating in a Project</paragraph> 49*c408df06Smseidel<paragraph role="heading" id="hd_id3145785" xml-lang="en-US" level="3" l10n="U">The Library List</paragraph> 50*c408df06Smseidel<paragraph role="paragraph" id="par_id3146120" xml-lang="en-US" l10n="U">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> 51*c408df06Smseidel<paragraph role="heading" id="hd_id3153190" xml-lang="en-US" level="3" l10n="U">The Object Catalog</paragraph> 52cdf0e10cSrcweir<embed href="text/sbasic/shared/01020200.xhp#object_catalog"/> 53*c408df06Smseidel<paragraph role="heading" id="hd_id3148647" xml-lang="en-US" level="2" l10n="U">Saving and Loading Basic Source Code</paragraph> 54*c408df06Smseidel<paragraph role="paragraph" id="par_id3154320" xml-lang="en-US" l10n="U">You can save Basic code in a text file for saving and importing in other programming systems.</paragraph> 55*c408df06Smseidel<paragraph role="warning" id="par_id3149959" xml-lang="en-US" l10n="U">You cannot save Basic dialogs to a text file.</paragraph> 56*c408df06Smseidel<paragraph role="heading" id="hd_id3149403" xml-lang="en-US" level="3" l10n="U">Saving Source Code to a Text File</paragraph> 57cdf0e10cSrcweir<list type="ordered"> 58cdf0e10cSrcweir<listitem> 59*c408df06Smseidel<paragraph role="listitem" id="par_id3150327" xml-lang="en-US" l10n="U">Select the module that you want to export as text from the object catalog.</paragraph> 60cdf0e10cSrcweir</listitem> 61cdf0e10cSrcweir<listitem> 62*c408df06Smseidel<paragraph role="listitem" id="par_id3150752" xml-lang="en-US" l10n="U">Click the <emph>Save Source As</emph> icon in the Macro toolbar.</paragraph> 63cdf0e10cSrcweir</listitem> 64cdf0e10cSrcweir<listitem> 65*c408df06Smseidel<paragraph role="listitem" id="par_id3154754" xml-lang="en-US" l10n="U">Select a file name and click <emph>OK</emph> to save the file.</paragraph> 66cdf0e10cSrcweir</listitem> 67cdf0e10cSrcweir</list> 68*c408df06Smseidel<paragraph role="heading" id="hd_id3159264" xml-lang="en-US" level="3" l10n="U">Loading Source Code From a Text File</paragraph> 69cdf0e10cSrcweir<list type="ordered"> 70cdf0e10cSrcweir<listitem> 71*c408df06Smseidel<paragraph role="listitem" id="par_id3147343" xml-lang="en-US" l10n="U">Select the module where you want to import the source code from the object catalog.</paragraph> 72cdf0e10cSrcweir</listitem> 73cdf0e10cSrcweir<listitem> 74*c408df06Smseidel<paragraph role="listitem" id="par_id3145230" xml-lang="en-US" l10n="U">Position the cursor where you want to insert the program code.</paragraph> 75cdf0e10cSrcweir</listitem> 76cdf0e10cSrcweir<listitem> 77*c408df06Smseidel<paragraph role="listitem" id="par_id3149565" xml-lang="en-US" l10n="U">Click the <emph>Insert Source Text</emph> icon in the Macro toolbar.</paragraph> 78cdf0e10cSrcweir</listitem> 79cdf0e10cSrcweir<listitem> 80*c408df06Smseidel<paragraph role="listitem" id="par_id3154020" xml-lang="en-US" l10n="U">Select the text file containing the source code and click <emph>OK</emph>.</paragraph> 81cdf0e10cSrcweir</listitem> 82cdf0e10cSrcweir</list> 83cdf0e10cSrcweir<section id="relatedtopics"> 84*c408df06Smseidel<paragraph role="paragraph" id="par_id3153198" xml-lang="en-US" l10n="U"><link href="text/sbasic/shared/01050000.xhp" name="Basic IDE">Basic IDE</link></paragraph> 85cdf0e10cSrcweir<embed href="text/sbasic/shared/01020200.xhp#01020200"/> 86cdf0e10cSrcweir</section> 87cdf0e10cSrcweir</body> 88cdf0e10cSrcweir</helpdocument> 89