|
Jeremy Falcon wrote: C was based on B and B was based on BCPL. I don't know what BCPL was written in, but the first B compiler was written in BCPL
Whilst I, too, don't know what BCPL was written in, I did hear why it was called BCPL. WikiPedia[^] says it stands for "Basic Combined Programming Language" and was invented in Cambridge University (UK). The story that I heard was there was a more complex language jointly designed by universities in Cambridge and London - that was call CPL (Cambridge Plus London). I do not know if CPL saw the light of day; but a simplified version called Basic CPL (or just BCPL) was created.
It had a bizarre construct, which was definitely a candidate for CPs Wierd and Wonderful forum), to resolve the 'Dangling ELSE problem'. It was something like IF condition DO statement and TEST condition THEN statement OR statement . (See https://www.bell-labs.com/usr/dmr/www/bcpl.pdf[^])
Edit:
I've just read the Wikipedia article (I should have done that before posting!). It says the CPL language was named originally from 'Cambridge Programming Language' and later renamed to 'Combined Programming Language'. No mention of London. But CPL (programming language) - Wikipedia[^] does mention the involvement of London and it was nicknamed 'Cambridge Plus London'. Thus, the name I heard was not its real name.
modified 7-Feb-23 5:26am.
|
|
|
|
|
That's cool to know. Thanks for sharing.
Jeremy Falcon
|
|
|
|
|
|
.
modified 3-Feb-23 9:16am.
|
|
|
|
|
Where did you find this expression?
|
|
|
|
|
Did you read the documentation[^]?
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Maybe if you actually provided the full details ...
|
|
|
|
|
[feb 2,2023,3:01am] same as Victor, could you describe the context of that message? A veteran probably needs no further clue to guess the source of where that came from but some of us are not veterans (not me at least)
|
|
|
|
|
Because you're too lazy to do the work yourself, you post this nonsense just so you can down vote answers and legitimate questions? You are a troll.
Quote: From the perspective of an application, a "cancellation point" is any one of a number of POSIX function calls such as open(), and read(), and many others.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gerry Schmitz wrote: You are a troll. I tend to agree; he certainly has history. Also complains of being thrown out of other forums for "asking too many questions", but I suspect the real reason is not that.
|
|
|
|
|
|
Hi
just had some discussions. on IBMMAIN regarding the C++ code (DLL) using C++ I developed and tried porting to z/os
since I need a lot of the same functionality
I have been compiling on Z/OS XL C++ and I got some differences
as an example
auto ret = procpointer->extsymcollector->insert({ *s, *exsympointer });
where the XL C++ compiler didnt like the '{'
I was told by someone who works on the XL C++ compiler to ditch MSVC
and go with CLNG/LLMV
by going here
Clang/LLVM support in Visual Studio projects | Microsoft Learn[^]
As MSVC only goes to C++ 11
in addition I was told to ditch XL C++ and go to Open XL C++ As that goes to C++ 17 or 18 and is baseD on CLANG/LLVM
|
|
|
|
|
|
ForNow wrote: As MSVC only goes to C++ 11
No, it fully supports C++20.
Go to project properties pages -> General -> C++ Language Standard and select "ISO C++ 20 Standard".
Now, for that particular piece of code, the "{}" is the C++ initialization syntax available since C++11. You can try replacing that with:
auto ret = procpointer->extsymcollector->insert(T(*s, *exsympointer)); where T is the type of object that is inserted.
Mircea
|
|
|
|
|
David Crayford who works on the XL C\C++ z/os compiler suggested I switch my compiler from MSVC to CLANG\LLVM for a few reason one then seems to be easier portability
Whatโs your opinion
Thanks
|
|
|
|
|
I'm a MSVC and Visual Studio fan. I find it a superb development environment. Compiler is just one piece of the puzzle, but you also need a good editor and a good debugger. All in all, for day to day development, I think Visual Studio is hard to beat. More than once, after developing in Visual Studio I had to port to g++ and I never had any major problems.
Mircea
|
|
|
|
|
|
Mircea Neacsu wrote: No, it fully supports C++20.
Can you independently document that?
Years ago (decades) there was at least one source that did a detailed comparison between compilers to see which ones were most compliant. This was after ANSI C++ was release.
Microsoft did poorly in that comparison.
Then someone sued to prevent such comparisons. Or perhaps added end use license terms that prevented such comparisons. If Microsoft did not start that they certainly participated in it.
So my question then, as it goes back to the first one, is how do you know how compliant they are?
|
|
|
|
|
|
|
Hello friends ! , in my following code in C I want to invert my linked list in the display using a ๐ฟ๐ฒ๐ฐ๐๐ฟ๐๐ถ๐๐ฒ ๐ณu๐ป๐ฐ๐๐ถ๐ผ๐ป ; but the code does not work !! Is there an error; thank you for mentioning it :+1:
#include<stdio.h>
#include<stdlib.h>
struct cellule{
int a;
struct cellule *suivant;
};
//Recursive function to display the list in invers order
void affichage (struct cellule *liste){
while (liste!=NULL){
affichage(liste->suivant);
printf(" %d โ,liste->a);
}
}
int main()
{
struct cellule *liste,*p,*q,*r;
int n,i;
printf(โDonner le nombre dโelements de la liste:\nโ);
scanf(โ%d",&n);
printf(โEntrer les elements de la liste:\nโ);
for(i=0;i<n;i++)
{
p=(struct cellule="" *)malloc(sizeof(struct="" cellule));
scanf(โ%dโ,&(*p).a);
if(i="=0)" liste="p;
else" (*q).suivant="p;
q=p;
}
affichage(liste);
printf(โ\nโ);
system(โpauseโ);
return" 0;
}<="" pre="">
|
|
|
|
|
There are two issues:
1. Where you create the cellule structures:
for(i=0;i<n;i++)
{
p=(struct cellule *)malloc(sizeof(struct cellule));
scanf("%d",&(*p).a);
if(i==0)
liste = p;
else
(*q).suivant=p;
q=p;
}
q->suivant = NULL;
2. Your recursive method
void affichage (struct cellule *liste){
if (liste ==NULL) {
return; }
affichage(liste->suivant); printf(" %d ",liste->a); }
|
|
|
|
|
By "inverted" do you mean you want to print your list in reverse order?
E.g.
input: 1 2 3 4 5
output: 5 4 3 2 1
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
This is a test
in few words of plain English ,
can you comment on the title
preferably even answer the question
without
RTFM
Google it
everybody knows that
snidely remarks
etc etc etc
QBluetoothLocalDevice localDevices;
QBluetoothLocalDevice *localDevices_new = new QBluetoothLocalDevice();
Constructive comments , as always are appreciated.
"just the facts ... ma'am...."
PS
I know one is using a pointer...
|
|
|
|
|
If you're having problems understanding that, then you really do need to take a step back, find a good resource for learning C++ and work your way through it. This is simple, basic C++ stuff that you should be able to grok, almost without thinking about it. Using more basic types
class C {
public:
int n;
C() { n = 0; } };
C c; C *pc; C *pc2 = new C();
But these days you really should be using smart pointers instead of new/delete. See the documentation for std::shared_ptr and std::unique_ptr here: [Dynamic memory management - cppreference.com](https://en.cppreference.com/w/cpp/memory)
Keep Calm and Carry On
|
|
|
|