f



equal and not equal

how translate = and /= for pointer use?
and := ?
0
tecomeco (44)
9/1/2005 5:36:04 PM
comp.lang.ada 8774 articles. 2 followers. Post Follow

5 Replies
499 Views

Similar Articles

[PageSpeed] 2

> how translate = and /= for pointer use?
> and := ?

What do you mean by "for pointer use"?
0
fw12 (438)
9/1/2005 6:02:37 PM
Florian Weimer wrote:
>>how translate = and /= for pointer use?
>>and := ?
> 
> What do you mean by "for pointer use"?

And what do you want to translate from, and what do you want to 
translate to?

-- 
Bj�rn Persson                              PGP key A88682FD
                    omb jor ers @sv ge.
                    r o.b n.p son eri nu
0
spam-away (433)
9/1/2005 6:22:33 PM
TC a �crit :
> how translate = and /= for pointer use?
> and := ?

I bet you have a pointer to a data structure and want to use = or /= on
the content (and not on the pointer itself). Use .all.

   type PA is access String;
   A, B : PA := new String'("azerty");

   if A.all = B.all then
      ...

Also to assign a value to the pointer :

   A.all := (others => ' ');
   --  All char of A.all are set to space

Note that

   A.all := "qw";

Will raise Constraint_Error as A.all is 6 chars long not 2.
You can omit the .all if using a slice :

   A (1 .. 2) := "qw";

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
0
pascal20 (733)
9/1/2005 6:23:37 PM
TC wrote:

> how translate = and /= for pointer use?
> and := ?

http://en.wikibooks.org/wiki/Ada_Programming/Types/access

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
0
krischik (1357)
9/2/2005 3:20:39 PM
Martin Krischik wrote:

> TC wrote:
> 
>> how translate = and /= for pointer use?
>> and := ?
> 
> http://en.wikibooks.org/wiki/Ada_Programming/Types/access

Actually, once you read the module you will understand that you don't
compare access types in Ada.

Martin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com
0
krischik (1357)
9/2/2005 3:36:39 PM
Reply:

Similar Artilces:

equal or double equal
Hi, using = or == with string comparison is the same or not? Thanks in advance to anyone answering. -- Antonio Antonio Maschio wrote: > Hi, > > using = or == with string comparison is the same or not? > > Thanks in advance to anyone answering. > > -- Antonio Not. For more information, provide context. Ed. Antonio Maschio wrote: > Hi, > > using = or == with string comparison is the same or not? '==' is not supported by old shells. According to Bolsky/Korn the programs test and [ accept '=', while with the newer (non-POSIX) [[...]] oper...

All commands are equal, but some are more equal than others.
<In very poor Mark Roseman style> Fast forward 2 years. Our happy new Tcl coder AH (Anonymous Hacker) has just finished implementing a HTTP webcrawler using the http package when the phone rings. <PHB> AH we are having some problems with connections being dropped. Can you do some debugging? <AH> No problem, I will get to it straight away. AH renames the http command to http_ and creates a subclass http which overrides the connect method, to trace when connections are made. After restarting his application again AH notices that he is opening way too many connections. He fixes the bug and leaves in the debug code so he can trace the connections being set up. After that he goes home feeling very happy. FF 2 months In his free time AH is writing a scrabble application and he wants to be able to scramble a string. With his new found knowledge he is confident this should take no more than 30 minutes and starts writing. % <some oo command to create a method> string scramble {} {# scramble string} error string is not an object. Very surprised AH starts searching the Tcl wiki to find out what might be going on here, when he stumbles upon namespace ensembles. Thinking he found the way to do it AH happily goes to work again: % <command to add subcommands to namespace ensemble> string scramble {} {# scramble string} error string is not a namespace Getting a little bit annoyed now, AH decides to take the more involved way (everything is cmd args after...

equal
Does o1.equals(o2) imply o1==o2? Jerry wrote: > Does o1.equals(o2) imply o1==o2? No, not necessarily. a.equals(b) is a test for meaningful equivalence. a == b is a test for the memory address of a against the memory address of b. I.e. are a and b one object in memory? -- Bob On Thu, 2005-05-26 at 17:20 -0700, Jerry wrote: > Does o1.equals(o2) imply o1==o2? Try it: public static void main(String[] args) { String s1 = new String("A string"); String s2 = new String("A string"); System.out.println("equals : "+s1.equals(s2)); // prints 'tru...

equal
Hi everyone, I'm learning Lisp by myself using the book "Essential Lisp". In one of the exercises I'm asked to define equal in term of eql. This is my solution: (defun my-equal (x y) (cond ((eql x y) t) (t (my-equal-aux x y)))) (defun my-equal-aux (x y) (cond ((and (null x) (null y)) t) ((or (null x) (null y)) nil) ((listp (car x)) (and (my-equal (car x) (car y)) (my-equal (cdr x) (cdr y)))) ((not (eql (car x) (car y))) nil) (t (my-equal (cdr x) (cdr y))))) So far it behaves similar to the built-in equal. However I feel that my answer is verbose. This is...

does String.equals breaks the equals contract?
The following code compiled fine - should it have? public static void main(String[] args) { String a = "Edward"; String[] b = {"Edward"}; if(a.equals(b)) System.out.println(a + " equals " + b); else System.out.println(a + " does not equal " + b); } The equals method in String calss looks for the object to be an instance of String, which I guess String[] is . Then it does a character by character compare of the characters in the string. It fails (expected) but should a.equals(b)) even compile? Edward A Tho...

which class is equal to COleDateTime? and which is equal for COleCurrency?
and, what variable is same as COleDateTime::null? and what is same for AllocSysString()? thank you. On Sun, 5 Jun 2005 18:55:04 +0800 wen <wenming_hu2002@hotmail.com> wrote: w> what variable is same as COleDateTime::null? w> and what is same for AllocSysString()? Both have no equivalent in portable code. You may use wxDateTime instead of COleDateTime however. Regards, VZ -- TT-Solutions: wxWidgets consultancy and technical support http://www.tt-solutions.com/ --------------------------------------------------------------------- To...

Should equals() and compareTo() be equivalent to test for equality ??
Well, I know equals() and compareTo() could behave different to test for equality, it just depend on the way I implement them, but, Would it be a bad practice to rewrite equals() and compareTo() so they behave in the following way: - Two different instances of the same class hold different attribute values, calling equals() return false comparing both objects because they are not the same, but compareTo() return 0, since this is the sorting criteria I want (a desired attribute match). or even - Two different objects of the same class hold the same attribute values, this is, they are interna...

equalize
half sun , half shadow over a face. How can I equalize the colours of the face so that whole face looks the same ? (whole face in sun or shadow) command equalize does not do the trick and light effects also not good greetings johan with CS you could try Shadow/Highlight under image adjustments! failing that use a feathered selection & highlight or darken as the case may be. Harry "Johan" <son.of.zoic@pandora.be> wrote in message news:FmIWc.224174$NF2.10964018@phobos.telenet-ops.be... > half sun , half shadow over a face. > > How can I equalize the colours of...

Equality...
Hi, I have a matrix with nxn varaibles an entry and want to assign values to each of the entries. How can I do this in one go? I was hoping something like this works, but it doesn't... Array[Subscript[a, #1, #2] &, {3, 4}] = Array[Random[1], {3, 4}] Any tips are apprecited. R Hi, > > I have a matrix with nxn varaibles an entry and want to assign values > to each of the entries. How can I do this in one go? > > I was hoping something like this works, but it doesn't... > > Array[Subscript[a, #1, #2]&, {3, 4}] = Array[Random[1], {3...

equalizer
hi all, My question is about equalizers. Correct me if Iam wrong. "Equalizers are used only in Frequency domain." thanx. srikoll wrote: > hi all, > > My question is about equalizers. Correct me if Iam wrong. > > "Equalizers are used only in Frequency domain." > It's not a particularly meaningful or well-defined statement, but making reasonable assumptions about what the real question is then no, the above statement is incorrect. Paul "srikoll" <sri_kolli@yahoo.com> wrote in message news:e95f0303.0311231302.24d2c9b8@postin...

Not Equal
I have a sub report that I place in another report. When I do this I have to specify the Child and Master IDs. I would like the data from the subreport to only show the personnel that are not equal to the same EIN (tax ID Number). basically I am showing associate data, ie people that have the same mailing address. I show the primary subjects address on the first page but only want subject who doesn't have the same EIN on the second. I have my tables setup with a main table and referential integrity on everything else. All my forms and reports are runing off queries on not the tables. Thanks for any help. use a subselect to remove that record from your subreport datasource. ...

NOT EQUAL
What is the difference between these two statements: 1. IF AMT NE 0; 2. IF AMT <>0; The first statement gave me three results, one was negative amount. The second one gave me only two. I thought those two are the same. Thanks. Mia The <> operator in the data step means "max" not "not equals". "<>" means "not equals" in WHERE clauses. I always use NE, which works in either location, and I recommend that you do the same. -- JackHamilton@FirstHealth.com Manager, Technical Development Metrics Department, First Health West Sac...

Equalizer
Hi all, I want to find a way to do the "Equalizer" (similar to equipment on audio amplifier) using software (maybe C or others) on PC, should I use the filter bank technique? Or can I simply use FFT and just change amplitude of frequency components, then take inverse FFT? Is there open source or on-line guide for implementing a equalizer? Any suggestion are appreciated, thanks in advance! Karmas yer welcome .... http://www.musicdsp.org/files/biquad.c http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt http://www.harmony-central.com/Effects/Articles/Equali...

not equal to
Sorry this may sound like a stupid question but I was wondering what the syntax is for "not equal to" ? On Thu, 23 Feb 2006 22:49:02 -0000, "unknownking321" <unknownking321@hotmail.co.uk> wrote: >Sorry this may sound like a stupid question but I was wondering what the >syntax is for "not equal to" ? > if (a <> b) then 'a' does not equal to 'b' -- Regards, Frank "unknownking321" <unknownking321@hotmail.co.uk> wrote in message = news:dtle4q$q94$1@news6.svr.pol.co.uk... > Sorry this may sound like a ...

Proper installation of an equalizer amplifier on a dry pair/ Western Electric KS-20159-L2 Equalizer Amp
Is there anyone out there that is familiar with a Western Electric KS-20159-L2 Equalizer Amplifier and knows how to connect it, or at least can give me some general information on putting audio down dry pairs? We are a college radio station and use dry pairs sometimes to send audio back to our studio for remote broadcasts. Unfortunately, our setup had very muddy-sounding audio (almost no high end) and after testing, its frequency response was anything but flat. I've been assured by our telecom people that the dry pair itself is unconditioned. The equalizing amplifier installed ...

equalizing symbol
I need to show the following expression. a=3 X =a^2 ===== 8 where "a=3" is on the top of the '=', how to achieve this?Thanks. ZHANG Yan wrote: > a=3 > X =a^2 ===== 8 > > where "a=3" is on the top of the '=', how to achieve this?Thanks. > Will this do: $$ X =a^2 \mathop=\limits^{a=3} 8 $$ HTH, -- Arjen Bax s/-/./g for my real e-mail address. Don't force it. Use a larger hammer. ZHANG Yan wrote: > I need to show the following expression. > > > a=3 > X =a^2 ===== 8 > > where "a=3" is on the top of the '=', how to achieve this?Thanks. > > > If '====' is an arrow, then the following will do the trick where \xrightarrow is an extensible arrow in the amsmath package. $X=a^2\xrightarrow{a=3}8$ If you do not want the arrow or do not want to use amsmath, then you can do \newcommand{\longeq}{\mathrel{=\negthinspace=\negthinspace=\negthinspace=}} $X=a^2\stackrel{a=3}{\longeq}8$ N.B. \longeq is of a fixed length whereas \xrightarrow is extensible proportional to the width of the parameter. It is possible to write your own extensible version of \longeq using your favorite symbol, but this may be more work than necessary for your purpose. Arjen Bax wrote: > > ZHANG Yan wrote: > > > a=3 > > X =a^2 ===== 8 > > > > where "a=3" is on the top of the '=...

linear equalizer
i am trying to equalize the data using the function eqalgo=lms(0.1,0.5); eqobj=lineareq(10,eqalgo); eqobj.nSampPerSym=8; eqobj.ResetBeforeFiltering=0; eqobj.WeightInputs=eq_iniwt; eqobj.Weights=eq_iniwt; eq_data=equalize(eqobj,fft_data); where eq_iniwt is the randomly generated weights for the equalizer but the result after passing the signal is coming to be a vector of NaN lease help me what to do to get the value?? Thanks ...

Specifications of an Equalizer
Hello everyone, I owe my thanks to many of you for helping me implement my fixed-poin graphic equalizer. I was trying to get its characteristics/specification in terms of its Frequency response, Signal-to-noise ratio and Tota harmonic distortion. I came across this article http://www.rane.com/note145.html . Is thi the best source? Or do you have any other suggestions? For SNR, I was thinking more in the terms of the difference in th floating point output and the fixed point output. Is that a correct way t calculate SNR? Thanks, ~ R K ...

Equality question
I am trying to use complex values as hash keys (they are actually method calls caught by method_missing). However strange things are happening. Can someone explain what's happening here please where marked? confs = {"default" => "! Config\nfoo=bar\n"} hash = { [:firmware_id] => "12.4.8", [:uptime] => 0, [:read_configs] => confs, [:defuzz_configs, confs] => {"default" => "foo=bar\n"}, [:defuzz_configs, {"conf"=>"foo.txt"}] => {"default" => "...

Equal to Anything
For the purposes of a little test utility that we use, I need an object that evaluates as equal to anything. (I realise that this is a bad idea in some ways, breaking the equals/hashcode invariant and so forth, but I'm hoping that I can get away with it in this case.) It seems a simple enough task at first: >>> class EqualAnything(object): .... def __eq__(self, other): .... return True .... >>> spam = EqualAnything() >>> spam == 1 True >>> spam == "hello!" True >>> spam == datetime.datetime.now() True >>> 1 == spa...

equality and errors
hi - in visual tcl i have these 2 functions defined. when i check for nonNumeric values that code works. this code is giving me problems though. if a zero is entered in entry1 field it should fire. i dont understand!! I am really new to tcl. i am finishing my first visual tcl gui program using xotcl and i am trying to add this error trapping. thanks for any help, marvin # errorProc code set fail [catch { $first < 1} range1] if {$fail} { error "range1 error" } # code attached to a button set a [Toplevel1.Entry1 get] ; set b [Toplevel1.Entry2 get] ; set fail [catch {errorProc $a $b } returnString] if {$fail} { error "user error" "evaluating error" [list USER {123} {Non-Standard User-Defined Error}] ; } Hi Marvin, This seems to me like a non-standard use of the catch mechanism. Normally, I use catch to warn me if something is going to break so I can keep it from breaking, like if I need to do division where the denominator might be zero, for example. If I understand right, you have a proc which validates the contents of two entry widgets. If there is a problem, it throws an error, which the calling code catches. That code then throws another error. That structure is reasonable, although there's a problem with one of your catch statements. If I were writing this program, though, I would use a different approach besides catch and error. > set fail [catch { $first < 1} range1] > if {$fail} { >...

float equality
Hi, sorry if this is a very naive question (I'm new to ruby), but I haven't found an explication yet. When comparing to floats in ruby I came across this: >> a = 0.1 => 0.1 >> b = 1 - 0.9 => 0.1 >> a == b => false >> a > b => true >> a < b => false >> a <=> b => 1 I'm a bit lost here, shouldn't (0.1) and (1 - 0.9) be equals regarding the == operator? I also found that for example 0.3 == (0.2 + 0.1) returns false, etc. guille PD: I'm using ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] On ...

Count equals to ..?
Hello, I have a table from which a chart should be generated. there is one column that can have a value between 0-5. Now I want to run a query for column xy which counts the amount of zeros, ones, twos,... How can I build the query that it is known before that 6 results will be given back? If I make something like this: SELECT count(*) FROM cbc_survey c group by xy my chart does not know the amount of columns. I tried SELECT count(xy=1),count(xy=2),... FROM cbc_survey c but did not work. Any ideas? Thank u very much! Best regards, Dennis In article <eeqcqm$hhu$1@daniel-new.mch.sbs.de>, Dennis Kuntzemann says... > Hello, > > I have a table from which a chart should be generated. there is one column > that can have a value between 0-5. Now I want to run a query for column xy > which counts the amount of zeros, ones, twos,... > How can I build the query that it is known before that 6 results will be > given back? > If I make something like this: > SELECT count(*) FROM cbc_survey c group by xy my chart does not know the > amount of columns. > > I tried SELECT count(xy=1),count(xy=2),... FROM cbc_survey c but did not > work. > Any ideas? > > Thank u very much! > > Best regards, > > Dennis SELECT foo, count(*) FROM table GROUP BY foo; where foo is the 0-5 column -- PleegWat Remove caps to reply Dennis Kuntzemann wrote: > Hello, > > I have a table from which a chart should be generated. t...

Equality operator
Why doesn't this statement execute in Python: 1 == not 0 I get a syntax error, but I don't know why. Thanks, Adam Roan italy wrote: > Why doesn't this statement execute in Python: > > 1 == not 0 > > I get a syntax error, but I don't know why. Because == has higher precedence than 'not', so you are asking for (1 == not) 0 Try >>> 1 == (not 0) True Kent > > Thanks, > Adam Roan > > Why doesn't this statement execute in Python: > > 1 == not 0 > > I get a syntax error, but I don't know why. This...

Web resources about - equal and not equal - comp.lang.ada

The Flag of Equal Marriage
The Flag of Equal Marriage is an evolving protest flag for equal marriage rights in the US. It includes one star for each state which recognizes ...

Equal Employment Opportunity Commission - Wikipedia, the free encyclopedia
The U.S. Equal Employment Opportunity Commission (EEOC) is a federal law enforcement agency that enforces laws against workplace discrimination. ...

HRC Red Equal Sign In Support Of Same-Sex Marriage Goes Viral On Facebook
Facebook users who are puzzled by seeing red equal signs all over their News Feeds , here’s what they’re all about: With the Supreme Court hearing ...

The Unequal Adoption of Equal Signs
... and Lada Adamic . In late March 2013 Facebook, especially among US users, was overtaken by a flood of profile pictures displaying an equal ...

Content Equals Money (@Content_Money) on Twitter
Sign in Sign up You are on Twitter Mobile because you are using an old version of Internet Explorer. Learn more here Content Equals Money @ Content_Money ...

Call for women to be more militant in quest for equal pay
Zelda D'Aprano is no stranger to campaigning for gender pay equity. In 1969 she famously chained herself to the doors of the Arbitration Court ...

Call for women to be more militant in quest for equal pay
Zelda D'Aprano is no stranger to campaigning for gender pay equity. In 1969 she famously chained herself to the doors of the Arbitration Court ...

Call for women to be more militant in quest for equal pay
Zelda D'Aprano is no stranger to campaigning for gender pay equity. In 1969 she famously chained herself to the doors of the Arbitration Court ...

Equal Before the Law: Cardinal Pell and the Presumption of Innocence
How we stand before the law is one of those common goods we share as citizens. Whatever else George Pell might be, he is a fellow citizen. He ...

Novak Djokovic questions equal prize money in tennis
World number one Novak Djokovic questions equal prize money in tennis, saying men should get more as they have more spectators.

Resources last updated: 3/23/2016 4:34:52 AM