473,388 Members | 1,492 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Tips needed - How do I match the "{" with "}"

Hi

How do I match the "{" with "}"
This is to math the loop begin and end.

There is a command/short cut (say ALT F5) I used but I forgot.

Thanks

Nov 7 '06 #1
8 1367
2005 said:
Hi

How do I match the "{" with "}"
This is to math the loop begin and end.
You press % - which also works for ( ) and [ ] of course.

(I presume you're using vim, like any sensible C programmer.)
There is a command/short cut (say ALT F5) I used but I forgot.
I dare say you could map ALT F5 to it if you wanted.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Nov 7 '06 #2
if cscope is enabled u can use SHIFT+5 ,

Caution : before going to use this make some comment and in comment
add { or }

for(somecode)
{

code
/*

some code
} <--this is commented

*/
code
}

now try to match the { after for.

this is d point required in mind while you are debugging complex code.
--raxit

Nov 7 '06 #3
"2005" <uw*****@yahoo.comwrote:
How do I match the "{" with "}"
This is to math the loop begin and end.
You use strcspn() or strbrk() to find the '{'s and '}'s, and you use a
stack construct (either indirectly, through recursion, or directly,
using, say, a linked list) to determine which '}' belongs to which '{'.
If you want to know how, the simplest way of figuring out an algorithm
is, as so often, to sit down behind a piece of paper, copy down a random
formula with such brackets in it, and observe how you yourself match
them up.
There is a command/short cut (say ALT F5)
ISO C does not guarantee that you even have Alt or F5 keys, let alone
that you can read them.

Richard
Nov 7 '06 #4
"2005" <uw*****@yahoo.comwrites:
How do I match the "{" with "}"
This is to math the loop begin and end.

There is a command/short cut (say ALT F5) I used but I forgot.
You're asking about some specific editor (and you haven't told us
which one), not about the C language.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 7 '06 #5

Keith Thompson wrote:
"2005" <uw*****@yahoo.comwrites:
How do I match the "{" with "}"
This is to math the loop begin and end.

There is a command/short cut (say ALT F5) I used but I forgot.

You're asking about some specific editor (and you haven't told us
which one), not about the C language.
Sorry, Visual Studio 6 EE.

Nov 7 '06 #6
In article <11********************@h48g2000cwc.googlegroups.c om>,
2005 <uw*****@yahoo.comwrote:
>
Keith Thompson wrote:
>"2005" <uw*****@yahoo.comwrites:
How do I match the "{" with "}"
This is to math the loop begin and end.

There is a command/short cut (say ALT F5) I used but I forgot.

You're asking about some specific editor (and you haven't told us
which one), not about the C language.

Sorry, Visual Studio 6 EE.
Smackin' the newbies, day after day.

Nov 7 '06 #7
"2005" <uw*****@yahoo.comwrites:
Keith Thompson wrote:
>"2005" <uw*****@yahoo.comwrites:
How do I match the "{" with "}"
This is to math the loop begin and end.

There is a command/short cut (say ALT F5) I used but I forgot.

You're asking about some specific editor (and you haven't told us
which one), not about the C language.

Sorry, Visual Studio 6 EE.
Ok, so you'll need to ask in a forum where they discuss Visual Studio
6 EE.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 7 '06 #8
2005 wrote:
Keith Thompson wrote:
>"2005" <uw*****@yahoo.comwrites:
>>How do I match the "{" with "}"
This is to math the loop begin and end.

There is a command/short cut (say ALT F5) I used but I forgot.

You're asking about some specific editor (and you haven't told us
which one), not about the C language.

Sorry, Visual Studio 6 EE.
It's still not about the portable standard C language, which is the
subject of this newsgroup, and thus is off-topic here. You want a
group with the words Visual or Microsoft in its name.

The moment you have to be specific about a compiler, editor,
linker, etc. it is off topic here.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Nov 7 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: kmunderwood | last post by:
I am trying to combine "if match=" and "when test" I am a newbie, and have made both work separately, but I can not seem to combine them. This is my xml("index.xml")page(I can not change this,...
8
by: gregory_may | last post by:
Is there a way to grab a "Screen Shot" that includes "Tool Tips"? I saw this code someplace, cant remember where. But it doesnt grab "Tool Tips". Is there a better way to do this in .net?...
1
by: gregory_may | last post by:
Is there a way to grab a "Screen Shot" that includes "Tool Tips"? I saw this code someplace, cant remember where. But it doesnt grab "Tool Tips". Is there a better way to do this in .net?...
10
by: gregory_may | last post by:
Is there a way to grab a "Screen Shot" that includes "Tool Tips"? I saw this code someplace, cant remember where. But it doesnt grab "Tool Tips". Is there a better way to do this in .net?...
5
by: Davros9 | last post by:
Trying to get Regular Expressions working....... ---------------- Public Function SepString(InField As String) As String ''seperates on space and comma Dim RE As New RegExp Dim Matches As...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.