473,569 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1381
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_Keit h) 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************ ********@h48g20 00cwc.googlegro ups.com>,
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_Keit h) 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
2064
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, it comes to me this way. <?xml version="1.0" encoding="iso-8859-1" ?>
8
3443
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? Thanks! Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput...
1
291
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? Thanks! Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput...
10
477
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? Thanks! Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput...
5
4377
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 Match RE.IgnoreCase = True
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.