Re: how to use scientific notation in a clip?

Expand Messages
• Hi, Thanks for all the good tips on how to do this. It seems that all these are evaluated by \$Calc with the second one (1.43e9) being the simplest to explain
Message 1 of 1 , Dec 5, 2006
Hi,

Thanks for all the good tips on how to do this. It seems that all these are evaluated by \$Calc with the second one (1.43e9) being the simplest to explain how to enter into a prompt.

1.43 x 10 to the 9th
-------------------
1.43*10^9
1.43e9
1.43*power(10;10)

When I convert from wavelength to frequency, the result is in standard notation, not scientific.
21 cm = 1427583133.333

I can carefully count groups of three to figure out whether it's MHz, GHz, or whatever. I imagine it would be tricky to convert the result to scientific notation.

Yours,

Michael F
-������-
~
http://www.mafware.com
*************************
Never Forget
September 11, 2001
*************************

-------------- Original message --------------
From: ntb-clips@yahoogroups.com
The NoteTab Clips List
Messages In This Digest (15 Messages)
1a. Re: how to use scientific notation in a clip? From: Sheri
1b. Re: how to use scientific notation in a clip? From: Veli-Pekka T���l���
1c. Re: how to use scientific notation in a clip? From: Alec Burgess
1d. Re: how to use scientific notation in a clip? From: Veli-Pekka T���l���
2. Re: New file uploaded to ntb-clips From: Corl DeLuna
3a. Pesky # characters From: Robin Chapple
3b. Re: Pesky # characters From: Axel Berger
3c. Re: Pesky # characters From: hsavage
3d. Re: Pesky # characters From: Sheri
3e. Re: Pesky # characters From: loro
3f. Re: Pesky # characters From: Robin Chapple
3g. Re: Pesky # characters From: Robin Chapple
3h. Re: Pesky # characters From: Julie
3i. Re: Pesky # characters From: loro
3j. Re: Pesky # characters From: Axel Berger
View All Topics | Create New Topic Messages
1a. Re: how to use scientific notation in a clip?
Posted by: "Sheri" silvermoonwoman@... silvermoonwoman2001
Mon Dec 4, 2006 9:09 am (PST)
I think you will find what you need here:

http://tech.groups.yahoo.com/group/ntb-clips/message/10156

Regards,
Sheri

--- In ntb-clips@yahoogroups.com, mfrascinella@... wrote:
>
> Hi,
>
> I just made two clips that convert frequency to wavelength and vice
versa but could not figure out how to use the math functions to handle
this. I would like the frequency to allow for numbers like 1.43x10 to
the 9th power, and the same for the speed of light (29979245800
cm/sec). Can someone explain to me the correct syntax?
>
> H="Frequency -> Wavelength"
> ^!Prompt ^?[Enter the frequency (cycles per sec.)] cycles/sec =
^\$Calc(29979245800/^?[Enter the frequency (cycles per sec.)])\$ cm
>
> H="Wavelength -> Frequency"
> ^!Prompt ^?[Enter the wavelength (cm)] cm =
^\$Calc(29979245800/^?[Enter the wavelength (cm)])\$ cycles/sec.
>
>
> Yours,
>
> Michael F
> -������-
> ~
> http://www.mafware.com
> *************************
> Never Forget
> September 11, 2001
> *************************
>
> [Non-text portions of this message have been removed]
>

Messages in this topic (5)
1b. Re: how to use scientific notation in a clip?
Posted by: "Veli-Pekka T���l��� vtatila@... vepeta
Mon Dec 4, 2006 9:28 am (PST)
mfrascinella@... wrote:
> made two clips that convert frequency to wavelength and vice versa <snip>
> how to use the math functions to handle scientific notation.
> 1.43x10 to the 9th power
I've yet to use math in clip code but it should work the same as in the
evaluate expression command within NoteTab. THere are at least two ways to
handle exponentiation:

The power of operator is the up arrow or caret ^ so:

1.43 * 10^9

Also, for base 10 scientific notation you can include the exponent directly
after the letter e as in languages like C. Such a floating point literal
would be written:

1.43e9

Hope this helps. YOu can veryfy that both do work by selecting an expression
and hitting ctrl+e on it to evaluate it.

--
With kind regards Veli-Pekka T���l���vtatila@...)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/

Messages in this topic (5)
1c. Re: how to use scientific notation in a clip?
Posted by: "Alec Burgess" buralex@... alecb3ca
Mon Dec 4, 2006 8:10 pm (PST)

Veli-Pekka:
> Also, for base 10 scientific notation you can include the exponent
> directly
> after the letter e as in languages like C. Such a floating point literal
> would be written:
>
> 1.43e9
>
> Hope this helps. YOu can veryfy that both do work by selecting an
> expression
> and hitting ctrl+e on it to evaluate it.
>
Did you find that somewhere in Notetab's Help or just "guess" that was
probably the format for scientific notation?
I couldn't find it anywhere in Help nor in the yahoo-clips group archive.

Regards ... Alec -- buralex-gmail
--

[Non-text portions of this message have been removed]

Messages in this topic (5)
1d. Re: how to use scientific notation in a clip?
Posted by: "Veli-Pekka T���l��� vtatila@... vepeta
Mon Dec 4, 2006 11:46 pm (PST)
Alec Burgess wrote:
> Veli-Pekka:
>> Also, for base 10 scientific notation you can include the exponent
>> directly
>> after the letter e as in languages like C. Such a floating point
>> literal would be written:
>> 1.43e9
> Did you find that somewhere in Notetab's Help or just "guess" that was
> probably the format for scientific notation?
That was just a guess. it is a common enough convention in other programming
languages that I thought it just might work. I took a look at the Calculate
in NoteTab topic and the e notation is not mentioned at all.

The exponentiation operator ^ is, though_

Quote:
Accepted operators:
+ , - , * , / , ^ , MOD, DIV
End quote.

Nowhere is it stated that the up arrow is exponentiation. But that is very
likely given that the other operator people often use for it in langs like
Fortran or Perl, that is **, is not mentiond at all. If ** is exponentiation
or there's no such thing, ^ is often the bitwise logical exclusive or. But
NoteTAb clips store every datatype as text and currently there are no
bitwise operators to my knowledge.

--
With kind regards Veli-Pekka T���l���vtatila@...)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/

Messages in this topic (5)
2. Re: New file uploaded to ntb-clips
Posted by: "Corl DeLuna" corl@... corl_deluna
Mon Dec 4, 2006 10:51 am (PST)
Thanks Horst,

A year and a half? Wow! While the goal of CVS is very appealing, the
methodology takes time to get one's head around it. Especially for me trying
to juggle 2 dozen very different things. I've taken this on as a very long
term project.

I've also been looking at Subversion http://svnbook.red-bean.com/, and
http://subversion.tigris.org/

Your use of CVS to branch sounds possibly similar to how I do my
experimentations on successive copies, I always make a new copy as each
element is stabilized, so I can easily return to the last stable version
should the next step fall apart on me.

Best,
Corl

_____

From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
Of hn273
Sent: Monday, December 04, 2006 3:32 AM
To: ntb-clips@yahoogroups.com
Subject: Re: [Clip] New file uploaded to ntb-clips

Hi Corl DeLuna,

--- In ntb-clips@yahoogrou <mailto:ntb-clips%40yahoogroups.com> ps.com,
"Corl DeLuna" <corl@...> wrote:
> Hi hn273,
>
> Just a short note to thank you for taking the time to post this file on
> Tortoise CVS. ...

> ... I'm reading a little of the html intro
> file each day, and looking forward to the day I begin to implement
it in our
> workflow.

Hhm, I've only found that file, I have not written it. =:)

For me, it tooks about 1 1/2 year, to really embedd the CVS-thing into
my workflow. But I never want miss it. Mostly I use the possibility to
branch and merge. Really mostly branch ;-). If it ends up in a mess, I
leave the branch and go on with another branch or the HEAD. It makes
coding-life much more relaxed.

I've installed the CVSNT-Server on one machine and it is highly
recommendet to work with the server. Of course, you must create a
Repository on one machine, e.g. with or without a CVS-Server. But
without, there can happen strange things related to different times on
the machines which access the Repository. So, it takes only 10 minutes
to pick the CVSNT-Server and install it. It's Freeware. It installs as
a Service, what allows to access it, without the need that someone is
logged into that machine, (only the machine must running ;-) )

The link to CVSNT is within the clip.
Also, if you start with the CVS, TCVS, you should join their List.
even if they was very, very basic.

Kind regards,
Horst

[Non-text portions of this message have been removed]

Messages in this topic (30)
3a. Pesky # characters
Posted by: "Robin Chapple" robinski@... d9790
Mon Dec 4, 2006 12:54 pm (PST)
I use NoteTab to clean formatted documents to plain text for use in web pages.

One clip is used to remove residual marks that include hash
characters and it is mostly useful.

I find that it does not remove the hash character.

What have I done wrong?

^!Jump DOC_START
;FIND "# & # AND REPLACE
^!Replace ""#" >> " " WAIS
^!Replace "#" >> " " WAIS

Thanks,

Robin Chapple

Messages in this topic (10)
3b. Re: Pesky # characters
Posted by: "Axel Berger" Axel-Berger@... absalom_nemini
Mon Dec 4, 2006 3:29 pm (PST)
Robin Chapple wrote:
> What have I done wrong?

I think it is a bug in clips. Can you do it when using Replace from the
menu bar and copying and pasting the character from the document into
the dialog?
With another character I could and yet the same would not work in clips.

I did find a workaround though as posted on Oct 10th:

^!Replace "^P" >> "<BR>" WA
^!Replace "‘" >> "'" WA
^!Replace "’" >> "'" WA
^!Replace "“" >> """ WA
^!Replace "”" >> """ WA
^!Replace "…" >> "..." WA

In your case the HTML special characters will be different ones but this
should work. The first line is necessary because the last one undoes
more than the second did.

Axel

Messages in this topic (10)
3c. Re: Pesky # characters
Posted by: "hsavage" hsavage@... hrs62930
Mon Dec 4, 2006 4:16 pm (PST)
Robin Chapple wrote:
> I use NoteTab to clean formatted documents to plain text for use in
web pages.
>
> One clip is used to remove residual marks that include hash
> characters and it is mostly useful.
>
> I find that it does not remove the hash character.
>
> What have I done wrong?
>
> ^!Jump DOC_START
> ;FIND "# & # AND REPLACE
> ^!Replace ""#" >> " " WAIS
> ^!Replace "#" >> " " WAIS
>
> Thanks,
>
> Robin Chapple

Robin,

I don't have a sample of the text you're working on but I duplicated a
small sample of my own.

Using the replace commands from you sample clip I have no trouble
replacing the (hash)number characters from the sample.

I do have the latest NTP version but I don't know if that makes a
difference in this case.

?v?
2006.12.04
"Communication Skills I; Tears - The Last Resort, Not the First."
hrs ?;a href="mailto:hsavage%40pobox.com">hsavage@...

Messages in this topic (10)
3d. Re: Pesky # characters
Posted by: "Sheri" silvermoonwoman@... silvermoonwoman2001
Mon Dec 4, 2006 4:37 pm (PST)
Strange, doesn't work for me on a line of #'s, although it will
replace one if its the only thing on a line, or is followed by a space.

This works (replaces all of them in the whole doc):

^!Replace "\#" >> " " RAWS

Regards,
Sheri

--- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
>
> Robin Chapple wrote:
> > I use NoteTab to clean formatted documents to plain text for use in
> web pages.
> >
> > One clip is used to remove residual marks that include hash
> > characters and it is mostly useful.
> >
> > I find that it does not remove the hash character.
> >
> > What have I done wrong?
> >
> > ^!Jump DOC_START
> > ;FIND "# & # AND REPLACE
> > ^!Replace ""#" >> " " WAIS
> > ^!Replace "#" >> " " WAIS
> >
> > Thanks,
> >
> > Robin Chapple
>
> Robin,
>
> I don't have a sample of the text you're working on but I duplicated a
> small sample of my own.
>
> Using the replace commands from you sample clip I have no trouble
> replacing the (hash)number characters from the sample.
>
> I do have the latest NTP version but I don't know if that makes a
> difference in this case.
>
> ?v?
> 2006.12.04
> "Communication Skills I; Tears - The Last Resort, Not the First."
> hrs ?vage@...
>

Messages in this topic (10)
3e. Re: Pesky # characters
Posted by: "loro" loro-spam01-@... yastupidhoo
Mon Dec 4, 2006 5:15 pm (PST)
Robin Chapple wrote:
>I find that it does not remove the hash character.
>
>What have I done wrong?
>
>^!Jump DOC_START
>;FIND "# & # AND REPLACE
>^!Replace ""#" >> " " WAIS
>^!Replace "#" >> " " WAIS

Add a "T" to the flags. I thought that not to search for whole words only
was the default, but obviously not.

Lotta

Messages in this topic (10)
3f. Re: Pesky # characters
Posted by: "Robin Chapple" robinski@... d9790
Mon Dec 4, 2006 6:22 pm (PST)
At 5/12/2006 11:47, loro wrote:

> Robin Chapple wrote:
> >I find that it does not remove the hash character.
> >
> >What have I done wrong?
> >
> >^!Jump DOC_START
> >;FIND "# & # AND REPLACE
> >^!Replace ""#" >> " " WAIS
> >^!Replace "#" >> " " WAIS
>
>Add a "T" to the flags. I thought that not to search for whole words only
>was the default, but obviously not.

Pardon my ignorance. What is a "T" in this context?

Robin

Messages in this topic (10)
3g. Re: Pesky # characters
Posted by: "Robin Chapple" robinski@... d9790
Mon Dec 4, 2006 6:27 pm (PST)
Thanks Sheri,

That works for me as well.

Robin

At 5/12/2006 11:36, Sheri wrote:

>Strange, doesn't work for me on a line of #'s, although it will
>replace one if its the only thing on a line, or is followed by a space.
>
>This works (replaces all of them in the whole doc):
>
>^!Replace "\#" >> " " RAWS
>
>Regards,
>Sheri
>
>--- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
> >
> > Robin Chapple wrote:
> > > I use NoteTab to clean formatted documents to plain text for use in
> > web pages.
> > >
> > > One clip is used to remove residual marks that include hash
> > > characters and it is mostly useful.
> > >
> > > I find that it does not remove the hash character.
> > >
> > > What have I done wrong?
> > >
> > > ^!Jump DOC_START
> > > ;FIND "# & # AND REPLACE
> > > ^!Replace ""#" >> " " WAIS
> > > ^!Replace "#" >> " " WAIS
> > >
> > > Thanks,
> > >
> > > Robin Chapple
> >
> > Robin,
> >
> > I don't have a sample of the text you're working on but I duplicated a
> > small sample of my own.
> >
> > Using the replace commands from you sample clip I have no trouble
> > replacing the (hash)number characters from the sample.
> >
> > I do have the latest NTP version but I don't know if that makes a
> > difference in this case.
> >
> > ?v?
> > 2006.12.04
> > "Communication Skills I; Tears - The Last Resort, Not the First."
> > hrs ?vage@...
> >
>
>
>
>
>Fookes Software: http://www.fookes.us, http://www.fookes.com
>Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
>
>
>
>

Messages in this topic (10)
3h. Re: Pesky # characters
Mon Dec 4, 2006 6:39 pm (PST)
At 12/4/2006 09:18 PM, Robin Chapple wrote:
>At 5/12/2006 11:47, loro wrote:
>
> > Robin Chapple wrote:
> > >I find that it does not remove the hash character.
> > >
> > >What have I done wrong?
> > >
> > >^!Jump DOC_START
> > >;FIND "# & # AND REPLACE
> > >^!Replace ""#" >> " " WAIS
> > >^!Replace "#" >> " " WAIS
> >
> >Add a "T" to the flags. I thought that not to search for whole words only
> >was the default, but obviously not.
>
>Pardon my ignorance. What is a "T" in this context?

From the help file:
T: Does not search for whole words only (search string can be found
within longer words).

All possibilities:

^!Find "SearchText" [Options TCIBGWHRS]
Searches for the specified text. Tab and line break characters should
be replaced by their tokens (^T and ^P respectively). You can use the
following optional settings:
T: Does not search for whole words only (search string can be found
within longer words).
C: Searches for whole words only.
If the options T or C are not used, NoteTab will search for whole
words if the search criteria does not contain spaces or other word
delimiting characters. If the search criteria contains such
delimiters, then NoteTab will accept matches that are not whole words.
I: Ignores character case.
B: Searches backwards.
G: Global scope; searches through all the open documents.
W: Searches through the whole document (not just from the cursor position).
H: Only searches within selection if text is highlighted (setting
ignored if no text selected).
R: Specifies that the search criteria represents a
<mk:@MSITStore:C:\Program%20Files\NoteTab%20Pro\ClipCode.chm::/NOTETAB.chm::/regular_expressions.htm>regular
expression.
S: Silent search. NoteTab will not display any message box.
The following example will find the next occurrence of the word
NoteTab starting from the cursor position. If a match is not found in
the current document, the other open documents will also be searched:
^!FIND "NoteTab" G
The search criteria must always be placed between double quotes if
you don't specify search options.

^!Replace "SearchText" >> "ReplaceText" [Options TCIBGWHRSA]
or
^!Replace SearchText ReplaceText [Options TCIBGWHRSA]
Similar to the "^!Find" command but replaces matches with the replace
criteria. The first format uses spaces to separate parameters and the
second uses a tab character. Use one or the other but do not mix the
two formats within an instruction. You can use the following optional
setting, which is specific to the Replace command:
A: Use to replace all matched occurrences. When this option is not
used, only the first match is replaced.
The following Clip example will search all open documents and replace
the listed upper case HTML tags to their lower case equivalent:
^!Replace <B> <b> GA
^!Replace </B> </b> GA
^!Replace <I> <i> GA
^!Replace </i> </i> GA

[Non-text portions of this message have been removed]

Messages in this topic (10)
3i. Re: Pesky # characters
Posted by: "loro" loro-spam01-@... yastupidhoo
Mon Dec 4, 2006 6:51 pm (PST)
Robin Chapple wrote:
>At 5/12/2006 11:47, loro wrote:
> >Add a "T" to the flags. I thought that not to search for whole words only
> >was the default, but obviously not.
>
>Pardon my ignorance. What is a "T" in this context?

Instead of WAIS use WAIST. As Sheri also pointed out your clip finds "#"
when it's on its own but not in a string, so I assumed that was the problem
From help:
"T: Does not search for whole words only (search string can be found within
longer words)."

Lotta

Messages in this topic (10)
3j. Re: Pesky # characters
Posted by: "Axel Berger" Axel-Berger@... absalom_nemini
Tue Dec 5, 2006 6:12 am (PST)
hsavage wrote:
> I have no trouble
> replacing the (hash)number characters from the sample.

Well, yes, obviously. Text emails use a limited character set and the
example got boiled down by the interface. But from:

>> ;FIND "# & # AND REPLACE

you can see, that more than one hash-like character was meant originally
and presumably both aren't our basic 7-bit ASCII "#".

Axel

Messages in this topic (10) Recent Activity
7 New Members
Preventative maintenance software program
Preventative maintenance program software
Computer software program
Help desk software program
Scheduling program software
Yahoo! TV
"The 9"
Daily count down
of top Web finds.
Get new customers.
in Yahoo! Search.
Drive Traffic
can help increase