அடிப்படைகள்

இந்தப் பிரிவு LibreOffice Basic க்குடன் இணைந்து பணிபுரியும் அடிப்படைகளை அளிக்கிறது.

LibreOffice Basic code is based on subroutines and functions that are specified between sub...end sub and function...end function sections. Each Sub or Function can call other Subs and Functions. If you take care to write generic code for a Sub or Function, you can probably re-use it in other programs. See also Procedures and Functions.

Note Icon

Some restrictions apply for the names of your public variables, subs, and functions. You must not use the same name as one of the modules of the same library.


உட்பிரிவு என்றால் என்ன?

Sub is the short form of subroutine, that is used to handle a certain task within a program. Subs are used to split a task into individual procedures. Splitting a program into procedures and sub-procedures enhances readability and reduces the error-proneness. A sub possibly takes some arguments as parameters but does not return any values back to the calling sub or function, for example:

DoSomethingWithTheValues(MyFirstValue,MySecondValue)

ஒரு செயலாற்றி என்றால் என்ன?

A function is essentially a sub, which returns a value. You may use a function at the right side of a variable declaration, or at other places where you normally use values, for example:

MySecondValue = myFunction(MyFirstValue)

உலக மற்றும் உள்ளூர் மாறிகள்

Global variables are valid for all subs and functions inside a module. They are declared at the beginning of a module before the first sub or function starts.

துணை அல்லது செயலாற்றியில் நீங்கள் அறிவிக்கும் மாறிகள் இந்தத் துணை அல்லது செயல்பாட்டிற்குள் மட்டுமே செல்லுபடியாகும். இந்த மாறிகள் ஒரே மாதிரியான பெயர்களுடைய உலக மாறிகளையும் அதே பெயரில் மிக உயர் துணை அல்லது செயலாற்றிகளிலிருந்து வருகிற உள்ளமை மாறிகளையும் நீக்குகின்றன.

கட்டமைத்தல்

உங்களின் நிரலை நடைமுறைகளிலும் செயலாற்றிகளிலும் (துணைகளும் செயலாற்றிகளும்) பிரித்த பிறகு, இந்த நடைமுறைகளையும் செயலாற்றிகளையும் மற்ற திட்டங்களுக்குப் பயன்படுத்த சேமிக்க முடியும்.LibreOffice அடிப்படையானது நிரல்கூறுகளையும் நூலகங்களையும் ஆதரிக்கின்றன. துணைகளும் செயலாற்றிகளும் எப்போதுமே நிரல்கூறுகளில் உள்ளன. நீங்கள் நிரல்கூறுகளை உலகமையமாகவும் ஆவனத்தின் ஒரு பகுதியாகவும் வரையறுக்க முடியும். பன்மடங்கு நிரல்கூறுகள் நூலகத்தில் ஒருங்கிணைக்க முடியும்.

துணைகள், செயலாற்றிகள், நிரல்கூறுகள், நூலகங்கள் போன்றவற்றை ஒரு கோப்பிலிருந்து இன்னொரு கோப்புக்குபெருமம் உரையாடலைப் பயன்படுத்தி நகலெடுக்கவோ நகர்த்தவோ செய்கிறது.