Jump to content

OpenOffice Basic

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gune1206 (talk | contribs) at 10:27, 16 May 2014. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
세가지 현대의 기본 변형들: Mono Basic, OpenOffice Basic 그리고 Gambas.

OpenOffice Basic (이전에 알려진 StarOffice Basic ,StarBasicOOoBasic) 는 StarOfficeoffice suite에서 유래되고 OpenOffice.org통해 퍼진 그리고 LibreOffice와 같은 파생물인 ( LibreOffice Basic로 알려진) 프로그램 언어 BASIC 의 언어이다.

예시

오픈 오피스의 기본 자체는 다른 언어와 유사하지만, MicrosoftVBA같은, 응용 프로그램 인터페이스 (API) 는 매우 다르다, macro의 예에서 보여주는것과 같이. "paragraph count" 문서를 얻을수 있는 더 쉬운 방법이 있지만, 이 예는 텍스트 문서 안에 있는 각 단락에 순차적으로 접근하기 위한 가장 기본적인 방법을 보여준다.

Sub ParaCount
'
' Count number of paragraphs in a text document
'
  Dim Doc As Object, Enum As Object, TextEl As Object, Count As Long
  Doc = ThisComponent
' Is this a text document?
  If Not Doc.SupportsService("com.sun.star.text.TextDocument") Then
    MsgBox "This macro must be run from a text document", 64, "Error"
    Exit Sub
  End If
  Count = 0
' Examine each component - paragraph or table?
  Enum = Doc.Text.CreateEnumeration
  While Enum.HasMoreElements
    TextEl = Enum.NextElement
' Is the component a paragraph?
    If TextEl.SupportsService("com.sun.star.text.Paragraph") Then
      Count = Count + 1
     End If
  Wend
'Display result
  MsgBox Count, 0, "Paragraph Count"
End Sub

참조

더 읽기

  • Steinberg, James. Open Office Basic: An Introduction. CreateSpace Independent Publishing Platform. ISBN 978-1481270939.

바깥 고리

BASIC Macros

OpenOffice.org API