What do you use to make Comments

D

Dylan Parry

JCO said:
What do you use to make comments in your HTML code?

Sorry that I'm a newbeee!

No need to apologise, we were all newbies once. I would suggest however
that you use Google for simple questions like this, as you are likely to
get an answer quicker and you'll feel better for finding out for yourself,
just try a search like "HTML comments" and you're bound to find the answer :)
 
J

JCO

Thanks all of you!
I'm C++ programmer but never messed with html until starting to look at
FrontPage.
Thanks again.
 
D

Dylan Parry

JCO said:
I'm C++ programmer but never messed with html until starting to look at
FrontPage.

Here's a tip for you then :) As a C++ programmer you would know that you
can't trust a WYSIWYG program to create code for you, and MS FrontPage is
no exception! If you are seriously wanting to learn HTML, then consider
dropping the WYSIWYG and use a simple text editor, even Notepad will so ;)
 
J

JCO

I certainly believe you, however, I don't want to learn html.
I simply had no choice but to do a simple edit on a FrontPage web and wanted
to comment the simple function that I added.

Thanks!
 
W

Whitecrest

Here's a tip for you then :) As a C++ programmer you would know that you
can't trust a WYSIWYG program to create code for you....

No one builds a GUI application in C without using a WYSIWYG generated
code. Visual Studio, Borland C, even GNU create code for you when
building an application. And thank god they do. Who wants to write all
the BS common code to handle a button event? I will tell it what to do
when the event happens, but I dont want to deal with the code that
triggers the actual event (Message maps etc...) The GUI stepping in
adding common code has been a godsend to application developers.

Well up to date developer that is. You can still use Notepad you write
all your C application, and debug with printf's if you like. But no one
will hire you.
 
T

Toby A Inkster

Whitecrest said:
No one builds a GUI application in C without using a WYSIWYG generated
code.

You're just talking crap about stuff you know nothing about Whitecrest.

Most GUI applications for Unix/Linux, most Java applets and many graphical
applications for Windows are written in text editors.
Who wants to write all the BS common code to handle a button event?

You don't need to -- that's what graphical toolkits are for. You write a
line of code to create a button, something like:

myButton = new Button;

Then assign a few properties:

myButton.setText("Click Here");

And add event listeners:

myButton.addEvent("click", myFunction);
void myFunction() {
do this;
do that;
}

This is the way that *most* applications are written. Outside the VB
community, anyway.
 
J

JCO

I agree with you Toby.
As a Visual C ++ developer, which is already tedious programming, the last
thing I need to do it get into the lower level details. I don't even care
to get into the Assembly Code, but sometimes you have to look it.

We are off the subject!

I simply had to add a 5 line script to each of my htm pages so that they
will programmatically call my frame set. It works great. I'm a person that
likes to document my code in detail. That all their is to it.

Thanks everyone for the help, I appreciate it.
 
W

Whitecrest

I certainly believe you...

Have a back bone. What C++ development application do you use,that
agrees with that statement?
I simply had no choice but to do a simple edit on a FrontPage web and wanted
to comment the simple function that I added.

There is the truth, you had no choice. FP is a fine editor. People here
are a little anal about WYSISYG editors because they thing that you are
too stupid to look at the code after you the WYSIWYG editor lets you
easily lay the page out.

Now to answer your question

An HTML comment begins with "<!--", ends with "-->" and does not contain
"--" or ">" anywhere in the comment.

http://www.htmlhelp.com/reference/wilbur/misc/comment.html
 
W

Whitecrest

You're just talking crap about stuff you know nothing about Whitecrest.

Sure I don't. I have been developing C based application for the last
12 years. I have gone from Turbo C to Borland C++ Professional to
Visual C++ 1.5 to Visual Studio to .net. For the last 3 years I have
been developing Web based Multimedia applications for the Entertainment
industry, which require a huge back end to manage and produce, archive
and manage live web casts. As of 30 days ago, I only film and record in
my home studio. (I believe you will find a similar resume about 2 years
ago prompted by a gentleman named Chip if you search Google)

It was required by every single company I have ever worked for, or
contracted with, that you understand how to develop GUI applications
using (most of the time Visual C++) the development tool of choice by
the company.
Most GUI applications for Unix/Linux, most Java applets and many graphical
applications for Windows are written in text editors.

Oh pu-pu. There may be a text editor in the development tool you use,
but, but you don't sit there with a blank screen and say "hmmm, I think
the coordinates of the text field will be (20,20). You draw it. Then
you press a button and tell the development tool you want to add a
handler for the button. It asks you the name, adds the appropriate code
that must be there no matter who creates it, to handle the button press,
and opens a text editor with the cursor sitting in the right place to
start typing your code. If you are using Visual C++ and Visual Studio
then there is even a comment waiting for you there saying to "add your
code here"

So they ALL generate code for you. Every single one of them. And that
is what I disagree with originally, the statement, that if you are a C
programer then you obviously know that you never depend on code written
by the interface. I totally disagree. You most certainly do rely on a
lot of code created by the interface. His statement is wrong. Period.

And if you are a C programmer developing GUI applications then you know
that is wrong too.

Creating GUI based application (windows or *nix) without these tools is
completely archaic. Thats why these tools are included in virtually
every single development environment for *nix or Windows applications.
(including Java)
You don't need to -- that's what graphical toolkits are for. You write a
line of code to create a button, something like:

Ah so you are agreeing with me then. C programmers do in fact rely on
code generated by the development interface. Never mind, from your tone
you it sounded like you were either disagreeing with me, or did not
understand what I said.
 
T

Toby A Inkster

Whitecrest said:
An HTML comment begins with "<!--", ends with "-->" and does not contain
"--" or ">" anywhere in the comment.

An HTML comment may contain '>'.

<!-- I am>a valid<>comment. -->
 
T

Toby A Inkster

Whitecrest said:
You're just talking crap about stuff you know nothing about Whitecrest.

Sure I don't. I have been developing C based application for the last
12 years.
[snip]
You don't need to -- that's what graphical toolkits are for. You write a
line of code to create a button, something like:

Ah so you are agreeing with me then. C programmers do in fact rely on
code generated by the development interface.

Writing C code for 12 years, but you don't understand the different
between using a graphics toolkit and using a graphical GUI editor?

Using a graphics toolkit involves typing source code directly into a text
editor. No whizzy point and click nonsense.

For example:

===============================================
#include <gtk/gtk.h>

static void hello( GtkWidget *widget, gpointer data ) {
g_print ("Hello World\n");
}

static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) {
g_print ("delete event occurred\n");
return TRUE;
}

static void destroy( GtkWidget *widget, gpointer data ) {
gtk_main_quit ();
}

int main( int argc, char *argv[] ) {
GtkWidget *window; GtkWidget *button;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (delete_event), NULL);
g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
button = gtk_button_new_with_label ("Hello World");
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (hello), NULL);
g_signal_connect_swapped (G_OBJECT (button), "clicked", G_CALLBACK (gtk_widget_destroy), G_OBJECT (window));
gtk_widget_show (button);
gtk_widget_show (window);
gtk_main ();
return 0;
}
===============================================

Typing in all this into a text-editor directly -- not auto-generating it
via said whizzy whizzy.

Yes, this is how the majority of serious applications are developed.

This is certainly not analogous to using FrontPage.
 
R

rf

JCO said:
I agree with you Toby.
As a Visual C ++ developer, which is already tedious programming, the last
thing I need to do it get into the lower level details. I don't even care
to get into the Assembly Code, but sometimes you have to look it.

To be able to properly debug code it is IMHO essential to understand
Assembly. Not perhaps to write but certainly to read.
We are off the subject!
I simply had to add a 5 line script to each of my htm pages so that they
will programmatically call my frame set. It works great. I'm a person that
likes to document my code in detail. That all their is to it.

<tongue position="cheek">
What? Document? Bah. If it was hard to write it should be hard to maintain
:)
<tounge>

Cheers
Richard.
 
W

Whitecrest

An HTML comment may contain '>'.
<!-- I am>a valid<>comment. -->

According to the WDG:

The definition of an SGML comment is basically as follows:
A comment declaration starts with <!, followed by zero or more comments,
followed by >. A comment starts and ends with "--", and does not contain
any occurrence of "--".
This means that the following are all legal SGML comments:
<!-- Hello -->
<!-- Hello -- -- Hello-->
<!---->
<!------ Hello -->
<!>
Note that an "empty" comment tag, with just "--" characters, should
always have a multiple of four "-" characters to be legal. (And yes, <!>
is also a legal comment - it's the empty comment).
Not all HTML parsers get this right. For example, "<!------> hello-->"
is a legal comment, as you can verify with the rule above. It is a
comment tag with two comments; the first is empty and the second one
contains "> hello". If you try it in a browser, you will find that the
text is displayed on screen.

There are two possible reasons for this:

The browser sees the ">" character and thinks the comment ends there.
The browser sees the "-->" text and thinks the comment ends there.
There is also the problem with the "--" sequence. Some people have a
habit of using things like "<!-------------->" as separators in their
source. Unfortunately, in most cases, the number of "-" characters is
not a multiple of four. This means that a browser who tries to get it
right will actually get it wrong here and actually hide the rest of the
document.
For this reason, use the following simple rule to compose valid and
accepted comments:

An HTML comment begins with "<!--", ends with "-->" and does not contain
"--" or ">" anywhere in the comment.

Your argument is with them, not me.
 
W

Whitecrest

Typing in all this into a text-editor directly -- not auto-generating it
via said whizzy whizzy.

Who generated all the back end code? Not you. You did not type a
single line of it. If you if you are a bigger fool that you appear to
be.
Yes, this is how the majority of serious applications are developed.
Duh

This is certainly not analogous to using FrontPage.

Never said it was, as a matter of fact if you READ before commenting,
you would see I said the opposite. Hence the "get a backbone" line.
 
R

rf

Toby A Inkster said:
Whitecrest wrote:
===============================================

Typing in all this into a text-editor directly -- not auto-generating it
via said whizzy whizzy.

Yes, this is how the majority of serious applications are developed.

This is certainly not analogous to using FrontPage.

You have never created a dialog for one of your applications then?

If so, did you use the resource editor and the associated wizards or did you
directly edit the .rc and .rh files and create class CMyDialog : public
CDialog yourself?

One must understand what is in, for example, a .rc file but write one? I
never have in the 24 years I have been writing C/C++ code. Sure, the bulk of
the 'logic' is coded by hand but the basic framework? Nope.

I think it's very analogous to using frontpage. Use the generator to produce
the basic elements (say a table) and then dive into the code to add the
tabular data that the table contains, fixing up the frontpage rubbish on the
way.

I find I must agree with Whitecrest on this one :)

Cheers
Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top