What do parameters stand for

Hi Everybody,
       I've been trying to read up on Interfaces but the author slipped in 
some mysterious nomenclature.
       The first is the "object obj" parameter in the Interface declaration. 
Small "o" in both cases.
       Then. it's even more mysterious as a  parameter in a  method which 
implements the Interface.  There's now a small "o" with no parenthesis 
around it.
        Could this be real code or is the author sending me a message.
Phil 


begin 666 object parameters.png
MB5!.1PT*&@H````-24A$4@```E@```#Z`0````$B430K````"7!(67,``"XC
M```N(P%XI3]V```54DE$051XG.U;#70459:^U5VF2Q/3C3+::$@JQ%T5?VAQ
M5X.&= 588=U9T?&/,ZN;,#(KGJ-C<% #)NF7'R&N.Z;]65?G,-**LZLSSHCG
MS)D%!I+JB)(11X*R.NZ(5(<HP8-2"<%4)]55>]^KZN[JI@-!<736O .I5Z]N
M?>^^^^Z[[][[JGD3[!+C(56P*@>?7LJJGUQ)(F>_\]#SM#7:!66K[F,$?J/F
MO=%?7TRK7=^'Z2\RVC/.R$#@M#;"JEKU[%FC*_G;>#@DS)JRZW"X`ULU5>KG
M!8,2N.$S__G/-S>NX^&T:P',YZ%'LMCA``(9G'%.)E/5L4:1LZKZ_OOO>)W7
M@!_\C%/+'GW\A[M^R)L<)\WN_,^\&S[B/:70<?_NVH78*@!<"Q?-*]#VVP@%
M((R)>WR<&5V5O2)6NY;6__2O=LZEK8&_[H 'WB8O40*?6FEHE([?52,!3+N)
M5J]P(FAY'&?"IU@=45>]43-7? *[^%CK^NT9OSOK1X=X*-! 4 !<A =^T=^^
ML0#R#U#<'H#$.3!$+';<`.*)EN^=3\B7C?1(*-_1SOT!Y8YW1Y?>P?-0V!_A
MQ*LY[.)_(-9[\./U?\]>DR3H]Z?DZ__"\DV5!'O<[[?N^HHLNI'>/FD8I?Z<
M0D;M1SS_0MN=3SWENRKP0>W*JY<OLJ'75TQK"^L7O@!SVMZTN_/%7ECQE&!V
M3_I3K.,FJVWT3K@-W@*HJ( U25X\V:ST7,1X493E;[Q]L8M ""?L/-J'?LWU
MZ]P5_QA>^?*5X66_>>G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F'"T0J(<6^388H
M9!UJL."3\"J;4A>X!!K\T:>\E,;J@$,<].!<:JNI1G @/<HY46AQ)S^R3+&1
M\3B%M;5XT&-6&0WU/7(#8YD\*"4T<0,+.G5+(PV,WFD<J;*$GD?K2LD`29SR
M6LRU@RL.4M3;-!>?$2[A&=%]/:@W7(@,41F3$#]**>.BW"_2`-IDL2NGJVES
MP+"\I#<T$(*FQH'V(.WU-I"K-;:(N%6SRA]*D))EX9V$Z3EI`C$$7%S8R(\.
MX'V#F(Z7&58`BNG/"!OI&0PM11!4<%!TNNL@GN<F9F&MW\VRS-)JD2,#0%8'
M$AP]09*H15 =LC]J\6C #A-TMNR"&HO\:\T"-\B=`-:7%R2-)1T3D!7'H9"7
M8@>QP4-GYMET3M3^O>DQ2\"^)GRAS ?-1\FOCE&2,S:4E5<W;9 OL@\59%E@
MKOR+8[FSCPWD+XXU5IG FL":P)K FL "^#^K-_9EW4F1W@````!)14Y$KD)@
!@@``
`
end

0
Philip
3/3/2010 5:15:28 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

8 Replies
910 Views

Similar Articles

[PageSpeed] 19

Philip K wrote:
> Hi Everybody,
>        I've been trying to read up on Interfaces but the author slipped in 
> some mysterious nomenclature.

Please do not post attachments to the newsgroup.  Not only does it make 
your message unnecessarily large and harder for many people to read 
(since many news readers don't display attachments), not all news 
providers will even allow the attachment, either stripping it from the 
message, or rejecting the message altogether.

For reference, the code you're asking about looks like this:

   interface IStorable
   {
     void Write(object obj);
   }

and:

   public void Write(object o)

>        The first is the "object obj" parameter in the Interface declaration. 
> Small "o" in both cases.
>        Then. it's even more mysterious as a  parameter in a  method which 
> implements the Interface.  There's now a small "o" with no parenthesis 
> around it.
>         Could this be real code or is the author sending me a message.

Is this a book?  If so, and you actually believe the author is sending 
you a message personally, you might want to try getting more sleep.  :)

As for the question, it's not really clear what you're asking.  One 
would expect anyone doing any C# programming at all to understand how 
method parameters work, and for someone who understands that, there 
should not be any confusion.  But, it _seems_ like you're asking about 
how method parameters work.

On that assumption�

The names of the parameters of a method are not part of what is known as 
the "signature" of that method.  Only the name of the method itself, and 
the _types_ of each parameter.

The name is used only as a placeholder and for its descriptive 
characteristics when seen in method declarations without an 
implementation, such as in interfaces, abstract methods, and delegate types.

In addition, the parameter name is not required to be the same as that 
used in the declaration for the actual method implementation.  The only 
"requirement" such as it is would be that in the method implementation 
itself, when you want to refer to that parameter, you use the name that 
was used in the declaration of _that_ method implementation.

So, in the code example you've provided, the interface � which includes 
not a method implementation per se, but rather just a declaration of a 
method signature as part of the interface � may use any name it wants 
for the parameter, as can the method implementation itself.

As far as the actual choice of names for these parameters, "obj" and "o" 
are not very descriptive and so IMHO fail on that basis to be "good" 
parameter names.  But they are otherwise legal, and surely the author of 
whatever you're reading doesn't mean to convey anything other than the 
declaration of the method's signature or implementation in either case.

Pete
0
Peter
3/3/2010 5:41:55 AM
Philip K wrote:
> Hi Everybody,
>        I've been trying to read up on Interfaces but the author slipped in 
> some mysterious nomenclature.
>        The first is the "object obj" parameter in the Interface declaration. 
> Small "o" in both cases.
>        Then. it's even more mysterious as a  parameter in a  method which 
> implements the Interface.  There's now a small "o" with no parenthesis 
> around it.
>         Could this be real code or is the author sending me a message.
> Phil 
> 

There is nothing mysterious about this. The parameter type and name 
"object obj" is perfectly valid and even follows the recommended code 
standards.

The "object" keyword is an alias for the System.Object data type.

The parameter name "obj" is perhaps a bit undescriptive, but otherwise 
an ordinary parameter name.

The parameter name "o" in the implementation is even more undescriptive, 
and it's somewhat impractical not to use the same parameter names as in 
the interface, but other than that there is nothing wrong with it. The 
parameter names in the implementation doesn't have to match the interface.

There is one typo in the code, though. It uses "INterface" instead of 
"interface". If that is a hidden message, I have no idea what it could 
mean...

-- 
G�ran Andersson
_____
http://www.guffa.com
0
ISO
3/3/2010 8:55:59 AM
Hi Goran,
      Thank you kindly for the information.
Phil


"G�ran Andersson" <guffa@guffa.com> wrote in message 
news:e$68V9quKHA.5008@TK2MSFTNGP05.phx.gbl...
> Philip K wrote:
>> Hi Everybody,
>>        I've been trying to read up on Interfaces but the author slipped 
>> in some mysterious nomenclature.
>>        The first is the "object obj" parameter in the Interface 
>> declaration. Small "o" in both cases.
>>        Then. it's even more mysterious as a  parameter in a  method which 
>> implements the Interface.  There's now a small "o" with no parenthesis 
>> around it.
>>         Could this be real code or is the author sending me a message.
>> Phil
>
> There is nothing mysterious about this. The parameter type and name 
> "object obj" is perfectly valid and even follows the recommended code 
> standards.
>
> The "object" keyword is an alias for the System.Object data type.
>
> The parameter name "obj" is perhaps a bit undescriptive, but otherwise an 
> ordinary parameter name.
>
> The parameter name "o" in the implementation is even more undescriptive, 
> and it's somewhat impractical not to use the same parameter names as in 
> the interface, but other than that there is nothing wrong with it. The 
> parameter names in the implementation doesn't have to match the interface.
>
> There is one typo in the code, though. It uses "INterface" instead of 
> "interface". If that is a hidden message, I have no idea what it could 
> mean...
>
> -- 
> G�ran Andersson
> _____
> http://www.guffa.com 


0
Philip
3/6/2010 12:25:07 AM
Hi Peter,
     You are the one who needs some sleep.
      The garbage which you posted took up more bandwidth than my 
attachment.
Phil


"Peter Duniho" <no.peted.spam@no.nwlink.spam.com> wrote in message 
news:#s6A9QpuKHA.4220@TK2MSFTNGP05.phx.gbl...
> Philip K wrote:
>> Hi Everybody,
>>        I've been trying to read up on Interfaces but the author slipped 
>> in some mysterious nomenclature.
>
> Please do not post attachments to the newsgroup.  Not only does it make 
> your message unnecessarily large and harder for many people to read (since 
> many news readers don't display attachments), not all news providers will 
> even allow the attachment, either stripping it from the message, or 
> rejecting the message altogether.
>
> For reference, the code you're asking about looks like this:
>
>   interface IStorable
>   {
>     void Write(object obj);
>   }
>
> and:
>
>   public void Write(object o)
>
>>        The first is the "object obj" parameter in the Interface 
>> declaration. Small "o" in both cases.
>>        Then. it's even more mysterious as a  parameter in a  method which 
>> implements the Interface.  There's now a small "o" with no parenthesis 
>> around it.
>>         Could this be real code or is the author sending me a message.
>
> Is this a book?  If so, and you actually believe the author is sending you 
> a message personally, you might want to try getting more sleep.  :)
>
> As for the question, it's not really clear what you're asking.  One would 
> expect anyone doing any C# programming at all to understand how method 
> parameters work, and for someone who understands that, there should not be 
> any confusion.  But, it _seems_ like you're asking about how method 
> parameters work.
>
> On that assumption�
>
> The names of the parameters of a method are not part of what is known as 
> the "signature" of that method.  Only the name of the method itself, and 
> the _types_ of each parameter.
>
> The name is used only as a placeholder and for its descriptive 
> characteristics when seen in method declarations without an 
> implementation, such as in interfaces, abstract methods, and delegate 
> types.
>
> In addition, the parameter name is not required to be the same as that 
> used in the declaration for the actual method implementation.  The only 
> "requirement" such as it is would be that in the method implementation 
> itself, when you want to refer to that parameter, you use the name that 
> was used in the declaration of _that_ method implementation.
>
> So, in the code example you've provided, the interface � which includes 
> not a method implementation per se, but rather just a declaration of a 
> method signature as part of the interface � may use any name it wants for 
> the parameter, as can the method implementation itself.
>
> As far as the actual choice of names for these parameters, "obj" and "o" 
> are not very descriptive and so IMHO fail on that basis to be "good" 
> parameter names.  But they are otherwise legal, and surely the author of 
> whatever you're reading doesn't mean to convey anything other than the 
> declaration of the method's signature or implementation in either case.
>
> Pete 


0
Philip
3/6/2010 12:28:42 AM
On 05-03-2010 19:28, Philip K wrote:
>        The garbage which you posted took up more bandwidth than my
> attachment.

Attachments is not a good idea (in a group like this). Not
even small attachments.

Copy paste your code directly into your post. Then
everybody is happy.

Arne

0
ISO
3/6/2010 12:43:55 AM
Hi Arne,
1.       It's a good idea if one wants to make certain that there are no 
errors or typos when retyping a quote as Peter Donahue has done
2.      Flaming in a news group is considered bad by almost everyone --  
especially if the flamer does not even answer the question.
3.      This is much like the tempest in a teapot which keeps coming up in 
the Graphics newsgroups.  Self appointed moderators tell others not to use 
HTML because it wastes bandwidth.  The waste is trivial compared to the size 
of an attached image which is frequently a quarter of a megabyte.  HTML has 
the huge advantage that the text appears next to the image,  In order to 
copy/paste into a post, it seems to me to require HTML which would only 
agitate the Plain Text crowd.
4.    Anyway, do I understand Goran correctly that "object" is the same 
"Object" which is the base class for all other classes in C#.  Are both 
"obj" and "o" simply parameters.
Phil
PS:  Now here's my gripe about posts in all the newsgroups in the universe. 
Why in the world send out a repeat of all the old posts.  I have seen pages 
and pages of repeats with the only new comment being a few words.


"Arne Vajh�j" <arne@vajhoej.dk> wrote in message 
news:4b91a543$0$281$14726298@news.sunsite.dk...
> On 05-03-2010 19:28, Philip K wrote:
>>        The garbage which you posted took up more bandwidth than my
>> attachment.
>
> Attachments is not a good idea (in a group like this). Not
> even small attachments.
>
> Copy paste your code directly into your post. Then
> everybody is happy.
>
> Arne
> 

0
Philip
3/6/2010 2:28:44 AM
On 05-03-2010 21:28, Philip K wrote:
> "Arne Vajh�j"<arne@vajhoej.dk>  wrote in message
> news:4b91a543$0$281$14726298@news.sunsite.dk...
>> On 05-03-2010 19:28, Philip K wrote:
>>>         The garbage which you posted took up more bandwidth than my
>>> attachment.
>>
>> Attachments is not a good idea (in a group like this). Not
>> even small attachments.
>>
>> Copy paste your code directly into your post. Then
>> everybody is happy.
 > 1.       It's a good idea if one wants to make certain that there are no
 > errors or typos when retyping a quote as Peter Donahue has done

Hm.

My experience with copy paste is that it actually works fine.


 > 2.      Flaming in a news group is considered bad by almost everyone --
 > especially if the flamer does not even answer the question.

I would tend to agree.

With one modification though: people that after being told
politely how to do things refuse to do so - they deserve
to be flamed.

 > 4.    Anyway, do I understand Goran correctly that "object" is the same
 > "Object" which is the base class for all other classes in C#.  Are both
 > "obj" and "o" simply parameters.

C# object is a synonym for .NET System.Object.

If you are referring to:

void Write(object obj);
public void Write(object o)

then: yes.

 > PS:  Now here's my gripe about posts in all the newsgroups in the 
universe.
 > Why in the world send out a repeat of all the old posts.  I have seen 
pages
 > and pages of repeats with the only new comment being a few words.

It is important to quote enough to give a proper context but nothing
more.

That is always a balance.

Sometimes one makes a good decision - sometimes one makes a
not so good decision.

Arne
0
ISO
3/6/2010 3:21:52 AM
Philip K wrote:
> Hi Arne,
> 1.       It's a good idea if one wants to make certain that there are no 
> errors or typos when retyping a quote as Peter Donahue has done

It's true that there is the possibility of making a mistake when typing 
text from a book.  But, the solution to that is to be careful.  As I 
already explained, one of the important reasons to not use attachments 
is that if you do, you unnecessarily restrict your audience.

There are other problems as well, but if the sense of community isn't 
important to you, then at least you should be concerned about whether 
anyone's actually reading your post.

> 2.      Flaming in a news group is considered bad by almost everyone --  
> especially if the flamer does not even answer the question.

The only person who in this thread has come close to "flaming" has been 
you.  I simply offered a simple, polite request to not post attachments, 
as well as an explanation for the request.

And if you are accusing me of "flaming", then it seems you are also 
accusing me of not answering the question.  Which is ridiculous, given 
that I provided a detailed reply to your specific question (noting that 
there was nothing in your original question to suggest that you didn't 
understand "object" vs. "System.Object"�for future reference, you may 
want to save this link: 
http://msdn.microsoft.com/en-us/library/ya5y69ds.aspx)

Pete
0
Peter
3/6/2010 3:36:56 AM
Reply:

Similar Artilces:

Adding Report Parameter
Hi there, if I add the following - to the parentreport in section <Subreport Name="testSR"><Parameters> <Parameter Name="testString"> <Value>="hallo world"</Value> </Parameter> - to the subreport in section <ReportParameters> <ReportParameter Name="testString"> <DataType>String</DataType> <Nullable>true</Nullable> <AllowBlank>true</AllowBlank> </ReportParameter> I get "error: the subreport could not be shown" Why? TIA, Mart...

Report Parameters in SQL 2008
I have no issues with parameters using sql as a datasource but many issues with SSAS Cube as a data source. My report will not isolate the data to the selected report parameter. Any hints? ...

parameters
Hi, how can I get the parameters to print on a report so the reader knows what dates that information covers without having to enter the dates twice? Thanks! -- JoAnn Hi JoAnn, Just use the parameter as the control source in your report. So if you have [Enter Start Date:] as a parameter, you can set the control source of a text box to [Enter Start Date:]. Or you can use it as part of an expression: =[Enter Start Date:] & " through " & [Enter End Date:]. Clifford Bass JoAnn wrote: >Hi, > >how can I get the parameters to ...

Repeatedly Re-Specifying Sorting Parameters
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have a spreadsheet that has to be updated 2 or 3 times a week. Technically the information is updated daily, but as the information from the Web doesn't have specific addresses I have to manually update a 1,200+ line spreadsheet by hand. This takes a couple of hours each time. <br><br>The most important update is a Date. This may be anywhere from a day or two in the future to several weeks or months. This is also the first key everything is sorted on. It's in Column E. The second key i...

Crystal XI will not show all possible values in a parameter field
Hello: We have a Crystal XI report that has one parameter value that is a "static" rather than "dynamic". It works fine and, when you type in a value upon refreshing the report, the data is correct. We made a copy of the report, because we want a second report where the parameter value is dynamic rather than static. We do not want a range, but we do want a parameter that will show all possible values on the left and allow you to pick and choose one or more of those values. For some reason, not all of the possible values are showing in this dynamic parameter field...

Weird Parameter Passing Bug
I have the following classes : CTestBase CLogic (virtual class, derived from CTestBase) CScanLogic (derived from CLogic) CBacktestLogic (dervied from CLogic) I instantiate a CScanLogic object which takes 3 CStrings, and a CStringArray as parameters. The prototype looks like this : CScanLogic (CString &x,CString &y,CString &z,CStringArray &a); The members variables are protected variables residing in the CTestBase class. They are CString m_x,m_y,m_z; CStringArray m_a; CScanLogic::CScanLogic (CString &x,CString &y,CString &z,CStringArray &a): CLogic(x,y,z,a...

Query ask for parameter value?
Hi, I biult a query from another one. When I run the query, Access keep ask the value of M and F. When I click OK I get the result that I want. Is there a way to tell Access not to display dialog asking for value of M and F? SELECT NumberOfCitizenSpeakingByQuarter.Quaters, Sum(NumberOfCitizenSpeakingByQuarter.[Meeting Observed]) AS [Meeting Observed], Sum(NumberOfCitizenSpeakingByQuarter.Male) AS M, Sum(NumberOfCitizenSpeakingByQuarter.Female) AS F, [M]/[Meeting Observed] AS [Avg Male], [F]/[Meeting Observed] AS [Avg Female] FROM NumberOfCitizenSpeakingByQuarter GROUP BY Nu...

How capturing a parameter by means of the action Post URL?
I am trying to capture a parametro by means of the Method : Var1=Request.Form("Var") And I cannot Do it. Ing. Robert Prazuela. try string id=Request.Params["Var"]; -- John O'Donnell Microsoft CRM MVP http://www.microsoft.com/BusinessSolutions/Community/CRMFaqLanding.aspx "Robert Prazuela" <Robert Prazuela@discussions.microsoft.com> wrote in message news:003150E6-0009-43EE-966C-78C93FAA7229@microsoft.com... > I am trying to capture a parametro by means of the Method : > Var1=Request.Form("Var") > And I cannot Do it. > >...

JET 708526 JPM-13 13-Inch 1-1/2 Horsepower Open Stand Planer/Molder, 110/230-Volt 1 Phase
Price:$1,246.00 Image: http://thediscountlocator.info/image.php?id=B0000223LR Best deal: http://thediscountlocator.info/index.php?id=B0000223LR I purchased a JPM 13 and when I tried to get parts for it they told us that we could buy the planer but they did not carry parts for it. I hope you post this because I am disappointed that you cant buy parts for it even though you still sell it. James My JPM-13 is about a year old, and is being used to restore an old house. I use 5/4 and 8/4 fir and 5/4 maple exclusively. I make the door/window trim (1 1/8 thick x 5 in wide) and have custom kn...

SQL Reporting Services 2005 Report Parameters
Hello: I have created a SQL 2005 report that contains report parameters for such things as a beginning and ending date range and a string field. Is it possible to configure a report that allows you to do an "either/or" search, where you can put in a date range and not put in a value for that parameter string field that I mentioned? And, vice versa? I just want to allow for users to put in a date range if they want to and/or a value for the string field but not necessarily both. Is it possible to configure multiple parameter fields like this where you can choose...

Getting Parameter box
Its Not picking up they value inside the 1stReportFilter, keeps referring to Sales Report Table "Alan" wrote: > Have this code > > Sub PrintReports(ReportView As AcView) > ' This procedure used in Preview_Click and Print_Click Sub procedures. > ' Preview or print report selected in the ReportToPrint option group. > ' Then close the Print Sales Reports Dialog form. > Dim strReportName As String > Dim strReportFilter As String > Dim lOrderCount As Long > > ' Determine report filtering >...

Displaying report parameters on report
We have BusinessObjects XI in house and I was trying to create one of the reports in SSRS to mimic a BO report. One of the things I thought was simple was displaying list of parameters on the report with their values. Now this is pretty generic functionality. I have been trying to get this to work in a generalized fashion and found several blog posts which can do this. http://www.beaucrawford.net/post/Reporting-Services-(SSRS)-Enumerate-Parameters-in-RDL-Custom-Code.aspx http://beaucrawford.net/post/SSRS-ndash3b-Enumerate-Report-Parameters2c-part-II.aspx Now these are pretty c...

Update a report Parameter with select Max(date) from table
I'd like to update a report parameter with something similar to the following: @parameter= select Max(date) from table so it may be displayed in a report header or a report footer. has anyone tried this? ...

date parameter not accurate...
I have a table where each record has a resolution date ranging from 1/1/2006 thru 12/31/2006. If I do the followingin the res date field: Between #1/1/2006# And #3/31/2006#, it will show me all records where the resolution date is in that range. If I do the following in the res date field: Between [Start Date:] And [End Date:], where start date is 1/1/2006 and end date is 3/31/2006, it will show me records ranging from 1/1/2006 thru 12/31/2006. Is there any explanation for this? Thanks, Perry -- Message posted via http://www.accessmonster.com Is the resolution date being stored in a...

Convert to a Parameter Query
I have a web query that was created by going to a web page http://finance.yahoo.com/q/ks?s=GE selecting Export to Excel, then selecting the specific data I want to download. This is the query created: WEB 1 http://finance.yahoo.com/q/ks?s=GE Selection=21,24,26,29,32,35,38,41,44,48,52,55,58 Formatting=None PreFormattedTextToColumns=True ConsecutiveDelimitersAsOne=True SingleBlockTextImport=False DisableDateRecognition=False DisableRedirections=False The problem is that this does not create a parameter query. For example, if you use Microsoft's stock quote web query there is a paramet...

Persisting kernel driver parameters
Hi, Can anyone tell me what is the method of persisting data for kernel parameters? Is it the registry? Is it based on normal files? Thx, Nuno Use the registry, unless you are talkig very big data files, putting it in the registry under the driver's services key beneath a Parameters key is the default approach. -- Don Burn (MVP, Windows DKD) Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr "sinosoidal" <sinosoidal@discussions.microsoft.com> wrote in message news:A45EB006-372...

A tip for dealing with warning C4100: 'a' : unreferenced formal parameter
Hi all. Do you get anoyed by this warning: C:\...\MyProg.cpp(3) : warning C4100: 'a' : unreferenced formal parameter But don't want to turn off the warning? Here are some tips: Example: void foo( int a ) { // Do something useful not involving a } This can be changed to: void foo( int ) { // Do something useful not involving a } Or: void foo( int /*a*/ ) { // Do something useful not involving a } But what if you sometimes use 'a' as in: void foo( int a ) { TRACE( "a=%d\n", a ); // Do something useful } Try this to tell the compiler I am ignoring a: #...

How can I surface function/script parameter aliases to Get-Help?
I am starting to use the new Comment-Based Help feature for functions and scripts, but I do not see a way to surface aliases for parameter names to Get-Help. Example: Script file named Test-Me1: --begin file-- Param( [Alias('osn')] [string]$OptionSetName ) <# ..PARAMETER OptionSetName The name of an entry in the OptionSet XML file. #> --end file-- At a PowerShell prompt, I type: Get-Help -Full ./Test-Me1 Output: NAME C:\Temp\Test-Me1.ps1 SYNOPSIS SYNTAX C:\Temp\Test-Me1.ps1 [[-OptionSetName] <String>] [<CommonParameters...

Passing Parameters Between Subroutines
Sorry Guys, I rarely use Sub-Routines. I want to continue where I left off. Do not know what is wrong with the code below. Private Sub WeekNo_GotFocus() Dim W As Byte W = 18 HoldWeek (W) Me!WeekNo = W End Sub Public Sub HoldWeek(W As Byte) ' Comes in Correctly Dim db As DAO.database Dim rst As DAO.Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Select * From WeeklySchedule") rst.MoveLast W = rst!WeekNo ' This is the...

ObjectDataSource and null datetime parameter
Hi, Please could you help me with this problem, I am Building a website using ASP.net 2.0 and the .net 3.5. I have a GridView bound to an ObjectDataSource whose data source is a table adapter that was designed in the table adapter wizard (it has generated the Getdata() and Fill() methods). In order for me to pull back data that contains null values for DateTime and Integers I have had to add the methods below. The SetDate routine works but the SetNumber routine fails with the error shown underneath the code at the bottom of this page. I know null's for DateTimes and I...

How to perform LIKE syntax in parameter query?
Hello there, The following codes attempt to perform a wildcard search using LIKE in a parameter query, but not successful. sql = "SELECT f1, f2, f3 FROM dbo.Test WHERE userID LIKE @UserID"; cmd.Parameters.Add("@f3", SqlDbType.Char, 50).Value = "%" + F3 + "%"; What should be the correct codes? Many thanks, Ben Got it by changing the following from Char to VarChar :-) cmd.Parameters.Add("@f3", SqlDbType.VarChar, 50).Value = "%" + F3 + "%"; "Ben" wrote: > Hello there, > > T...

How to summarize data based on specific parameters
How do I summarize a large data set based on specifiec parameters. For example, I have a data set of water level measurements recorded at 1 hour increments for 1 year. I would like to calculated a daily average water level for each day. Is there a faster way to do this than manually selected all of the recordings within each day and individually calculating daily means. In other words, is there a formula I can use that tells excel to calculated means for each day? Assume the data starts in A2 going down =AVERAGE(OFFSET($A$2,ROW(1:1)*24-24,,24,)) if you copy it down it will averag...

query parameters 12-02-09
Hi I have a stored query in a accdb-database: UPDATE Table SET Field1 = [?] WHERE [Field2]=[?]; Running the query I am just prompted for one parameter. It must be only the second one. Since I type in an existing value for Field2 and then Field1 is updated with this value. Typing in the first parameter at that place, which should be written into the database I get the message: Are you sure, that you want to update 0 records? . . .no chance for the second parameter. Why am I not prompted for both parameters? Patrick Try giving them different names. UPDATE Table SET Fiel...

Parameters are not allowed in queries that can't be displayed grap
Until now, I have always used MSQuery to create queries with parameters, and then embedded the query into an Excel spreadsheet. This would allow me to anchor my parameters to certain cells on the spreadsheet. My report users could then change the values in those cells and click a button to refresh the query data. This works wonderfully with simple queries. Now I have created a very complex query, specifically a query that uses a subquery as its SELECT FROM. When I try to set up my parameters in MSQuery for this query... it says "parameters are not allowed in queries that can't...

Help! How to define a function-like macro which has a variable number of parameters?
I wanna define a function-like macro which has a variable number of parameters. Can anybody tell me if it is legal in C/C++? And how to write the directive if it can be defined? Thanks very much! Laser Lu wrote: >I wanna define a function-like macro which has a variable number of >parameters. Can anybody tell me if it is legal in C/C++? And how to write >the directive if it can be defined? Thanks very much! Some compilers offer this feature as an extension. VC++ isn't one of them. You can either write a set of inline, overloaded functions, which is the better choice for many ...