Sponsored Content
Top Forums Programming Why is required to leave an empty line at the end of a C program? Post 302425376 by semash! on Thursday 27th of May 2010 05:15:29 PM
Old 05-27-2010
Is that it? just standard behaviour? I thought there will be a logical reason for the new line at the end of the file.

And, yeah, i mean just one line..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

End of loop condition required???

Hi i have a variable with lots of tokens seperated with spaces. e.g VAR="ABC DEF GHSD GHQS TUTSD JHDTQ QDHQ CDQKDGQ WQUTQD DQUTQD DQJGDQ QDTQD WDQUTQDU QDUGQD QDJGQD DQUTDUQ QDUIDTQ" i want to separate all of the above tokens and call a script with each of the token e.g sh script.sh <TOKEN>... (4 Replies)
Discussion started by: skyineyes
4 Replies

2. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies

3. UNIX for Dummies Questions & Answers

Help required on printing the line if third field is not a empty space

Hi Experts, I want to print the lines whose third field in non-empty/blank space. i.e. INPUT FILE/B] dcdccghjrry0yd cont dcdccttrk820529 cont rdekedfsSCr dcdccttrdky2d0y cont rdekedfsSC2 ... (3 Replies)
Discussion started by: krao
3 Replies

4. Shell Programming and Scripting

Add Empty columns at the end of csv file

Hi, Can you please tell me how to add empty columns at the end csv file? Currently there are 6 columns in the csv file. I want to add 35 empty columns at the end of this csv file. Thanks, Tushar (17 Replies)
Discussion started by: Tushar Bendale
17 Replies

5. UNIX for Advanced & Expert Users

Empty lines at the end of the payload generated in FTP server

Hi All, I am facing an issue in one of the use cases that I am trying to implement. I am getting a purchase order from one of the trading partners through Oracle B2B. B2B forwards this B2BM (B2B message ) to AIAB2BInterface. From AIAB2BInterface my BPEL process gets invoked, which in turn... (1 Reply)
Discussion started by: mayank2211
1 Replies

6. UNIX for Dummies Questions & Answers

Removing empty lines at the end of a Tab-delimited file

I'm trying to remove all of the empty lines at the end of a Tab delimited file. They have no data just tabs. I've tried may things, here are a couple: sed /^\t.\t/d File1 > File2 sed /^\t{44}/d File1 > File2 What am I missing? (9 Replies)
Discussion started by: SirHenry1
9 Replies

7. Solaris

Test program running taking much more time on high end server T5440 than low end server T5220

Hi all, I have written the following program and run on both T5440 and T5220 on same OS version. I found that T5540 server takes more time than T5220. Please find below the details. test1.cpp #include <iostream> #include <pthread.h> using namespace std; #define NUM_OF_THREADS 20... (17 Replies)
Discussion started by: sanjay_singh85
17 Replies

8. Linux

Add empty columns at the end of a CSV file

I have a .CSV file (lets say named as file.csv) with numeric and string values. The string might contain commas hence they are enclosed in double quotes as in the below format. column1,column2,column3,column4,column5,column6,column7 12,455,"string, with, quotes, and with, commas, in... (3 Replies)
Discussion started by: dhruuv369
3 Replies

9. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

10. UNIX for Dummies Questions & Answers

Check for empty line at end of a dynamic header in each file

Hi Folks, I have a requirement to develop a shell script. PFB my requirement, Requirement: I need to check an empty line after the end of each header in respective file and if a empty line is present simply echo file OK and if empty line is not present echo "Adding empty line" and add an... (6 Replies)
Discussion started by: tpk
6 Replies
ntextBindings(n)				     Alternative Bindings for the Text Widget					  ntextBindings(n)

__________________________________________________________________________________________________________________________________________________

NAME
ntextBindings - Alternative Bindings for the Text Widget SYNOPSIS
package require Tcl 8.5 package require Tk 8.5 package require ntext ?0.81? _________________________________________________________________ DESCRIPTION
The ntext package provides a binding tag named Ntext for use by text widgets in place of the default Text binding tag. The Text binding tag provides around one hundred bindings to the text widget (the exact number is platform-dependent). A few of these behave in a way that is different from most contemporary text-editing applications. Ntext aims to provide more familiar behaviour. Features of the Ntext bindings that differ from the default Text bindings: o Clicking near the end of a (logical) line moves the cursor to the end of that line (not the start of the next line). If the widget is in -wrap word mode, the same rule applies to display lines. o Double-clicking or dragging near the end of a (logical) line will highlight/select characters from the end of that line (not the next line, or the region at the end of the line where there are no characters). If the widget is in -wrap word mode, the same rule applies to display lines. o The End key implements "Smart End" (successive keypresses move the cursor to the end of the display line, then to the end of the logical line); the Home key implements "Smart Home" (which is similar to "Smart End", but also toggles between the beginning and end of leading whitespace). o When a selection exists, a <<Paste>> operation (e.g. <Control-v>) overwrites the selection (as most editors do), and does so on all platforms. o The <Insert> key toggles between "Insert" and "Overwrite" modes for keyboard input. (In contrast, the Text binding tag uses <Insert> as a method to paste the "primary selection", a task that can be accomplished instead by mouse middle-click.) o The <Escape> key clears the selection. o Selecting with <Shift-Button1> selects from the previous position of the insertion cursor. (In the Text binding tag, the selection anchor may be the position of the previous mouse click.) o <Shift-Button1> operations do not alter the selection anchor. (In the Text binding tag, they do.) o By default, the Ntext binding tag does not provide several of the Control-key bindings supplied by the Text binding tag. Modern keyboards offer alternatives, such as cursor keys for navigation; modern applications often use the Control-key bindings for other purposes (e.g. <Control-p> for "print"). The last three cases, the behavior of Text is often useful, so Ntext gives you the option of retaining it, by setting variables defined in the ::ntext namespace to 1 (instead of their default 0). Explaining these features in more detail: o If the mouse is clicked at position A, then the keyboard is used to move the cursor to B, then shift is held down, and the mouse is clicked at C: the Text binding tag gives a selection from A to C; the Ntext gives a selection from B to C. If you want Ntext to behave like Text in this respect, set ::ntext::classicMouseSelect to 1. o The Text binding tag allows successive <Shift-Button-1> events to change both ends of the selection, by moving the selection anchor to the end of the selection furthest from the mouse click. Instead, the Ntext binding tag fixes the anchor, and multiple Shift-But- ton-1 events can only move the non-anchored end of the selection. If you want Ntext to behave like Text in this respect, set ::ntext::classicAnchor to 1. In both Text and Ntext, keyboard navigation with the Shift key held down alters the selection and keeps the selection anchor fixed. o The following "extra" Text bindings are switched off by default, but can be activated in Ntext by setting ::ntext::classicExtras to 1: <Control-a>, <Control-b>, <Control-d>, <Control-e>, <Control-f>, <Control-h>, <Control-i>, <Control-k>, <Control-n>, <Control-o>, <Control-p>, <Control-t>, <Control-space>, <Control-Shift-space>. CONFIGURATION OPTIONS
Ntext provides alternatives to a number of behaviours of the classic Text binding tag. Where there is an option, the Ntext behaviour is switched on by default, except for display-line indentation which is discussed on a separate page at ntextIndent. The behaviour of Ntext may be configured application-wide by setting the values of a number of namespace variables: ::ntext::classicAnchor o 0 - (default value) selects Ntext behaviour, i.e. the anchor point is fixed o 1 - selects classic Text behaviour, i.e. the anchor point is variable ::ntext::classicExtras o 0 - (default value) selects Ntext behaviour, i.e. several "extra" Text bindings are de-activated o 1 - selects classic Text behaviour, i.e. the "extra" Text bindings are activated ::ntext::classicMouseSelect o 0 - (default value) selects Ntext behaviour, i.e. the anchor point for mouse selection operations is moved by keyboard navigation o 1 - selects classic Text behaviour ::ntext::overwrite o 0 - (initial value) text typed at the keyboard is inserted into the widget o 1 - text typed at the keyboard overwrites text already in the widget o The value is toggled by the Insert key. EXAMPLE
To use Ntext but keep classic Text 's variable-anchor feature: package require ntext text .t set ::ntext::classicAnchor 1 bindtags .t {.t Ntext . all} SEE ALSO
bindtags, ntext, ntextIndent, text KEYWORDS
bindtags, text ntext 0.81 ntextBindings(n)
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy