Print# Statement

Outputs the specified strings or numeric expressions to the screen or to a sequential file.

tip

Use Put# statement to write data to a binary or a random file. Use Write# statement to write data to a sequential text file with delimiting characters.


Syntax:

Print syntax


Print [#filenum,] expression1[{;|,} [Spc(number As Integer);] [Tab(pos As Integer);] [expression2[...]]

Parameters:

filenum: Any numeric expression that contains the file number that was set by the Open statement for the respective file.

expression: Any numeric or string expression to be printed. Multiple expressions can be separated by a semicolon. If separated by a comma, the expressions are indented to the next tab stop. The tab stops cannot be adjusted.

number: Number of spaces to be inserted by the Spc function.

pos: Spaces are inserted until the specified position.

ប្រសិន​បើ​សញ្ញា​​ចំណុច​ក្បៀស ឬ​សញ្ញា​ក្បៀស​លេច​ឡើង​បន្ទាប់​ពី​កន្សោម​ដែល​នឹង​ត្រូវ​បោះពុម្ព LibreOfficeDev Basic រក្សា​ទុក​អត្ថបទ​ក្នុង​អង្គ​ចងចាំ​បណ្តោះ​អាសន្ន​មួយ និង​បន្ត​ប្រតិបត្តិ​កម្មវិធី​ដោយ​មិន​បោះពុម្ព ។ នៅ​ពេល​ជួប​ប្រទះ Print statement ផ្សេង​ទៀត​ដែល​គ្មាន​សញ្ញា​​ចំណុច​ក្បៀស ឬ​សញ្ញា​ក្បៀស​នៅ​ចុង​បញ្ចប់ អត្ថបទ​ទាំងអស់​ដែល​នឹង​ត្រូវ​បោះពុម្ព​ត្រូវ​បាន​បោះពុម្ព​ភ្លាម​ៗ ។

កន្សោម​​លេខ​វិជ្ជមាន​​ត្រូវ​​បាន​បោះពុម្ព​ដោយ​មាន​ដក​ឃ្លា​​នៅ​​ពី​​​មុខ ។ កន្សោម​អវិជ្ជមាន​ត្រូវ​បាន​បោះពុម្ព​ដោយ​មាន​សញ្ញា​ដក​នៅ​ពី​មុខ ។ ប្រសិន​បើ​ជួរ​ពិត​ប្រាកដ​ត្រូវ​បាន​លើស សម្រាប់​តម្លៃ​ទសភាគ កន្សោម​ជា​​លេខ​រៀង​ៗ​ខ្លួន​ត្រូវ​បាន​បោះពុម្ព​ក្នុង កំណត់​​​អិច​ស្ប៉ូណង់​ស្យែល ។

ប្រសិន​បើ​កន្សោម​ដែល​នឹង​ត្រូវ​បោះពុម្ព​លើស​ប្រវែង​ពិត​ប្រាកដ ការ​បង្ហាញ​នឹង​រុំ​ទៅ​ជួរ​បន្ទាប់​ដោយ​ស្វ័យ​ប្រវត្តិ ។

រូប​តំណាង​ចំណាំ

You can insert the Tab function, enclosed by semicolons, between arguments to indent the output to a specific position, or you can use the Spc function to insert a specified number of spaces.


Example: