473,624 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Module problem

I have a module called GetDocIndex which calculates a sequential number in a
control called CommDocNbrtxt. On the BeforeUpdate property of the form I
have the following code
Private Sub Form_BeforeUpda te(Cancel As Integer)

If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
Me.CommDocNbrtx t.Value = GetDocIndex
End If

The control isn't updated when I open the form and when I save the form I
get a message that points to this code that says Compile error Expected
variable or function not module. If I put the module code in the form module
it doesn't work either.
Can anyone help here?
TIA
Nov 12 '05 #1
11 2470
You can't call a "module", you have to call procedures in the module. Make sure that none
of the procedures have the same name as any module or any built in procedure.

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message news:bl******** *@titan.btinter net.com...
I have a module called GetDocIndex which calculates a sequential number in a
control called CommDocNbrtxt. On the BeforeUpdate property of the form I
have the following code
Private Sub Form_BeforeUpda te(Cancel As Integer)

If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
Me.CommDocNbrtx t.Value = GetDocIndex
End If

The control isn't updated when I open the form and when I save the form I
get a message that points to this code that says Compile error Expected
variable or function not module. If I put the module code in the form module
it doesn't work either.
Can anyone help here?
TIA

Nov 12 '05 #2
Thanks Wayne but being a newbie I'm a little confused. Here is the code for
my "function"
Function GetDocIndex() As String

Dim rsDocs As DAO.Recordset
Dim intDocIdx As Integer
Dim strLastIdx As String, strNewIdx As String, strSQL As String

' Get the last index for this year
strSQL = "SELECT Max([CommDocNbrtxt]) As [LastDocIdx] " & _
"FROM [tblDocuments] " & _
"WHERE (Right([CommDocNbrtxt], 2) = '" & _
Right(CStr(Year (Date)), 2) & "');"
Set rsDocs = CurrentDb.OpenR ecordset(strSQL )
With rsDocs
If Not .RecordCount = 0 Then strLastIdx =
..Fields("LastD ocIdx").Value
.Close
End With
Set rsDocs = Nothing

' Convert last index to integer or leave as zero
If Not strLastIdx = "" Then intDocIdx = CInt(strLastIdx )

' Increment the index
intDocIdx = intDocIdx + 1

' Append the 2 digit year as decimal value
strNewIdx = intDocIdx & "." & Right(CStr(Year (Date)), 2)

' Return the new index
GetDocIndex = strNewIdx

End Function

As I said earlier if I put this code as a function in the form I still don't
get my control to update with the right numbers numbers. What am I doing
wrong here?
Thanks
Tony
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message
news:Iy******** *********@newss vr33.news.prodi gy.com...
You can't call a "module", you have to call procedures in the module. Make sure that none of the procedures have the same name as any module or any built in procedure.
--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** *@titan.btinter net.com...
I have a module called GetDocIndex which calculates a sequential number in a control called CommDocNbrtxt. On the BeforeUpdate property of the form I
have the following code
Private Sub Form_BeforeUpda te(Cancel As Integer)

If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
Me.CommDocNbrtx t.Value = GetDocIndex
End If

The control isn't updated when I open the form and when I save the form I get a message that points to this code that says Compile error Expected
variable or function not module. If I put the module code in the form module it doesn't work either.
Can anyone help here?
TIA


Nov 12 '05 #3
Where are you putting this code in the form? If you are just adding the function, you need
something to tell Access to run the function. Under what circumstances do you want this
function to run? That will determine where you place the call to this function. For
example, if you want the function to run each time you move to another record, you would
place a call to it in the Form's OnCurrent event. You could also use it as the Control
Source for an unbound text box. To do that, set the Control Source of the text box to

=GetDocIndex

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message news:bl******** **@titan.btinte rnet.com...
Thanks Wayne but being a newbie I'm a little confused. Here is the code for
my "function"
Function GetDocIndex() As String

Dim rsDocs As DAO.Recordset
Dim intDocIdx As Integer
Dim strLastIdx As String, strNewIdx As String, strSQL As String

' Get the last index for this year
strSQL = "SELECT Max([CommDocNbrtxt]) As [LastDocIdx] " & _
"FROM [tblDocuments] " & _
"WHERE (Right([CommDocNbrtxt], 2) = '" & _
Right(CStr(Year (Date)), 2) & "');"
Set rsDocs = CurrentDb.OpenR ecordset(strSQL )
With rsDocs
If Not .RecordCount = 0 Then strLastIdx =
.Fields("LastDo cIdx").Value
.Close
End With
Set rsDocs = Nothing

' Convert last index to integer or leave as zero
If Not strLastIdx = "" Then intDocIdx = CInt(strLastIdx )

' Increment the index
intDocIdx = intDocIdx + 1

' Append the 2 digit year as decimal value
strNewIdx = intDocIdx & "." & Right(CStr(Year (Date)), 2)

' Return the new index
GetDocIndex = strNewIdx

End Function

As I said earlier if I put this code as a function in the form I still don't
get my control to update with the right numbers numbers. What am I doing
wrong here?
Thanks
Tony

Nov 12 '05 #4
Wayne, I have added the function and am using this code in the forms Before
Update property
Private Sub Form_BeforeUpda te(Cancel As Integer)

If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
Me.CommDocNbrtx t.Value = GetDocIndex
End If

End Sub
The control I want the number to appear in is CommDocIndextxt
I am not correct here? It doesn't work
Thanks
Tony
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message
news:hm******** ********@newssv r33.news.prodig y.com...
Where are you putting this code in the form? If you are just adding the function, you need something to tell Access to run the function. Under what circumstances do you want this function to run? That will determine where you place the call to this function. For example, if you want the function to run each time you move to another record, you would place a call to it in the Form's OnCurrent event. You could also use it as the Control Source for an unbound text box. To do that, set the Control Source of the text box to
=GetDocIndex

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** **@titan.btinte rnet.com...
Thanks Wayne but being a newbie I'm a little confused. Here is the code for my "function"
Function GetDocIndex() As String

Dim rsDocs As DAO.Recordset
Dim intDocIdx As Integer
Dim strLastIdx As String, strNewIdx As String, strSQL As String

' Get the last index for this year
strSQL = "SELECT Max([CommDocNbrtxt]) As [LastDocIdx] " & _
"FROM [tblDocuments] " & _
"WHERE (Right([CommDocNbrtxt], 2) = '" & _
Right(CStr(Year (Date)), 2) & "');"
Set rsDocs = CurrentDb.OpenR ecordset(strSQL )
With rsDocs
If Not .RecordCount = 0 Then strLastIdx =
.Fields("LastDo cIdx").Value
.Close
End With
Set rsDocs = Nothing

' Convert last index to integer or leave as zero
If Not strLastIdx = "" Then intDocIdx = CInt(strLastIdx )

' Increment the index
intDocIdx = intDocIdx + 1

' Append the 2 digit year as decimal value
strNewIdx = intDocIdx & "." & Right(CStr(Year (Date)), 2)

' Return the new index
GetDocIndex = strNewIdx

End Function

As I said earlier if I put this code as a function in the form I still don't get my control to update with the right numbers numbers. What am I doing
wrong here?
Thanks
Tony


Nov 12 '05 #5
Sorry forgot I want the control to be populated with a new number each time
a new record is created
Tony
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message
news:hm******** ********@newssv r33.news.prodig y.com...
Where are you putting this code in the form? If you are just adding the function, you need something to tell Access to run the function. Under what circumstances do you want this function to run? That will determine where you place the call to this function. For example, if you want the function to run each time you move to another record, you would place a call to it in the Form's OnCurrent event. You could also use it as the Control Source for an unbound text box. To do that, set the Control Source of the text box to
=GetDocIndex

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** **@titan.btinte rnet.com...
Thanks Wayne but being a newbie I'm a little confused. Here is the code for my "function"
Function GetDocIndex() As String

Dim rsDocs As DAO.Recordset
Dim intDocIdx As Integer
Dim strLastIdx As String, strNewIdx As String, strSQL As String

' Get the last index for this year
strSQL = "SELECT Max([CommDocNbrtxt]) As [LastDocIdx] " & _
"FROM [tblDocuments] " & _
"WHERE (Right([CommDocNbrtxt], 2) = '" & _
Right(CStr(Year (Date)), 2) & "');"
Set rsDocs = CurrentDb.OpenR ecordset(strSQL )
With rsDocs
If Not .RecordCount = 0 Then strLastIdx =
.Fields("LastDo cIdx").Value
.Close
End With
Set rsDocs = Nothing

' Convert last index to integer or leave as zero
If Not strLastIdx = "" Then intDocIdx = CInt(strLastIdx )

' Increment the index
intDocIdx = intDocIdx + 1

' Append the 2 digit year as decimal value
strNewIdx = intDocIdx & "." & Right(CStr(Year (Date)), 2)

' Return the new index
GetDocIndex = strNewIdx

End Function

As I said earlier if I put this code as a function in the form I still don't get my control to update with the right numbers numbers. What am I doing
wrong here?
Thanks
Tony


Nov 12 '05 #6
You say you want the result of GetDocIndex to appear in the ComDocIndextxt control, yet
you are assigning the result to the ComDocNbrtxt control.

Just to play it safe, do your controls have a different name than the fields they are
bound to? If the control's Control Source and the control's name are the same, you can run
into problems. This is usually handled by placing a prefix on the name of the control.
(i.e. Field Name = MyField, Control Name = txtMyField). I see you've appended txt to the
end of the names you are using, have you done that to accomplish this?

Also, you are doing this in the BeforeUpdate event. If it does place the value, it may do
so quickly, save the record, and move to the next record. You may not see it unless you go
back to that record and look for it.

You mentioned that you want to do this for a new record, what about an old record that the
field was left blank on? The way you currently have it, if you make a change to that old
record it would also run the function to update the old record with a number. If you want
to limit it to only new records, you could add an additional If statement.

If Me.NewRecord Then.....

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message news:bl******** **@sparta.btint ernet.com...
Wayne, I have added the function and am using this code in the forms Before
Update property
Private Sub Form_BeforeUpda te(Cancel As Integer)

If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
Me.CommDocNbrtx t.Value = GetDocIndex
End If

End Sub
The control I want the number to appear in is CommDocIndextxt
I am not correct here? It doesn't work
Thanks
Tony
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message
news:hm******** ********@newssv r33.news.prodig y.com...
Where are you putting this code in the form? If you are just adding the

function, you need
something to tell Access to run the function. Under what circumstances do

you want this
function to run? That will determine where you place the call to this

function. For
example, if you want the function to run each time you move to another

record, you would
place a call to it in the Form's OnCurrent event. You could also use it as

the Control
Source for an unbound text box. To do that, set the Control Source of the

text box to

=GetDocIndex

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** **@titan.btinte rnet.com...
Thanks Wayne but being a newbie I'm a little confused. Here is the code for my "function"
Function GetDocIndex() As String

Dim rsDocs As DAO.Recordset
Dim intDocIdx As Integer
Dim strLastIdx As String, strNewIdx As String, strSQL As String

' Get the last index for this year
strSQL = "SELECT Max([CommDocNbrtxt]) As [LastDocIdx] " & _
"FROM [tblDocuments] " & _
"WHERE (Right([CommDocNbrtxt], 2) = '" & _
Right(CStr(Year (Date)), 2) & "');"
Set rsDocs = CurrentDb.OpenR ecordset(strSQL )
With rsDocs
If Not .RecordCount = 0 Then strLastIdx =
.Fields("LastDo cIdx").Value
.Close
End With
Set rsDocs = Nothing

' Convert last index to integer or leave as zero
If Not strLastIdx = "" Then intDocIdx = CInt(strLastIdx )

' Increment the index
intDocIdx = intDocIdx + 1

' Append the 2 digit year as decimal value
strNewIdx = intDocIdx & "." & Right(CStr(Year (Date)), 2)

' Return the new index
GetDocIndex = strNewIdx

End Function

As I said earlier if I put this code as a function in the form I still don't get my control to update with the right numbers numbers. What am I doing
wrong here?
Thanks
Tony



Nov 12 '05 #7
Thanks Wayne, I think I get confused with field name and control name I
assumed they had to be the same. So, do I make the control source = field
name in the table and the control name whatever I like. In which case when I
want to refer to the field in code or a report do I use the control source
name. If that's the case what is the purpose of the control name?

Sorry about the confusion the control is ComDocNbrtxt, I appended txt to
names so that I know it's a text field, have I got the convention the wrong
way round?

Being a newbie at this at 58 means I have to work harder on the grey cells
to make them cooperate!!!
But thanks for your patience and advice, I'll now try and put it into
practice and let you know how I got on.

Tony
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message
news:Dq******** *********@newss vr31.news.prodi gy.com...
You say you want the result of GetDocIndex to appear in the ComDocIndextxt control, yet you are assigning the result to the ComDocNbrtxt control.

Just to play it safe, do your controls have a different name than the fields they are bound to? If the control's Control Source and the control's name are the same, you can run into problems. This is usually handled by placing a prefix on the name of the control. (i.e. Field Name = MyField, Control Name = txtMyField). I see you've appended txt to the end of the names you are using, have you done that to accomplish this?

Also, you are doing this in the BeforeUpdate event. If it does place the value, it may do so quickly, save the record, and move to the next record. You may not see it unless you go back to that record and look for it.

You mentioned that you want to do this for a new record, what about an old record that the field was left blank on? The way you currently have it, if you make a change to that old record it would also run the function to update the old record with a number. If you want to limit it to only new records, you could add an additional If statement.

If Me.NewRecord Then.....

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** **@sparta.btint ernet.com...
Wayne, I have added the function and am using this code in the forms Before Update property
Private Sub Form_BeforeUpda te(Cancel As Integer)

If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
Me.CommDocNbrtx t.Value = GetDocIndex
End If

End Sub
The control I want the number to appear in is CommDocIndextxt
I am not correct here? It doesn't work
Thanks
Tony
"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message news:hm******** ********@newssv r33.news.prodig y.com...
Where are you putting this code in the form? If you are just adding the
function, you need
something to tell Access to run the function. Under what circumstances
do you want this
function to run? That will determine where you place the call to this

function. For
example, if you want the function to run each time you move to another

record, you would
place a call to it in the Form's OnCurrent event. You could also use
it as the Control
Source for an unbound text box. To do that, set the Control Source of
the text box to

=GetDocIndex

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** **@titan.btinte rnet.com...
> Thanks Wayne but being a newbie I'm a little confused. Here is the
code for
> my "function"
> Function GetDocIndex() As String
>
> Dim rsDocs As DAO.Recordset
> Dim intDocIdx As Integer
> Dim strLastIdx As String, strNewIdx As String, strSQL As String
>
> ' Get the last index for this year
> strSQL = "SELECT Max([CommDocNbrtxt]) As [LastDocIdx] " & _
> "FROM [tblDocuments] " & _
> "WHERE (Right([CommDocNbrtxt], 2) = '" & _
> Right(CStr(Year (Date)), 2) & "');"
> Set rsDocs = CurrentDb.OpenR ecordset(strSQL )
> With rsDocs
> If Not .RecordCount = 0 Then strLastIdx =
> .Fields("LastDo cIdx").Value
> .Close
> End With
> Set rsDocs = Nothing
>
> ' Convert last index to integer or leave as zero
> If Not strLastIdx = "" Then intDocIdx = CInt(strLastIdx )
>
> ' Increment the index
> intDocIdx = intDocIdx + 1
>
> ' Append the 2 digit year as decimal value
> strNewIdx = intDocIdx & "." & Right(CStr(Year (Date)), 2)
>
> ' Return the new index
> GetDocIndex = strNewIdx
>
> End Function
>
> As I said earlier if I put this code as a function in the form I
still don't
> get my control to update with the right numbers numbers. What am I

doing > wrong here?
> Thanks
> Tony



Nov 12 '05 #8
Yes, you can make the control name whatever you want, but I would recommend keeping it
similar to the field name so that you don't have a lot to remember. Sometimes with both
names the same, Access doesn't know which of the two items you are referring to and it
will cause a problem.

A good example of naming conventions can be found at
http://www.mvps.org/access/general/gen0012.htm

Does the function return the correct value, just the value doesn't go into the control?

--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message news:bl******** **@sparta.btint ernet.com...
Thanks Wayne, I think I get confused with field name and control name I
assumed they had to be the same. So, do I make the control source = field
name in the table and the control name whatever I like. In which case when I
want to refer to the field in code or a report do I use the control source
name. If that's the case what is the purpose of the control name?

Sorry about the confusion the control is ComDocNbrtxt, I appended txt to
names so that I know it's a text field, have I got the convention the wrong
way round?

Being a newbie at this at 58 means I have to work harder on the grey cells
to make them cooperate!!!
But thanks for your patience and advice, I'll now try and put it into
practice and let you know how I got on.

Nov 12 '05 #9
I have the control CommDocNbrtxt on my form as a General Number and all that
appears in the control on a new record is a "0", on current records the
control is blank.
The latest state is this:
I have the code as a function in my form module, with the function called
GetDocIndex, the first line being
Function getDocIndex() As String
In the OnCurrent property of the form I have the following code
Private Sub Form_Current()
If Me.CommDocNbrtx t = "" Then
Me.CommDocNbrtx t.Value = getDocIndex
End If
End Sub

At the moment the control name and control source are both CommDocNbrtxt .
If I change the control name to say Docnbr which name do I use in the
Function and On Current property, the control name or the control source?

Thanks for the link for conventions I'll change all my names when I've got
this to work!!

I am wondering whether I could get some simpler code which just gives me
sequential numbers and concatenate the year from another field but that's
not what my friend wants and that would be like giving in!!
Thanks again for your help.
Tony

"Wayne Morgan" <co************ *************** @hotmail.com> wrote in message
news:%R******** ********@newssv r24.news.prodig y.com...
Yes, you can make the control name whatever you want, but I would recommend keeping it similar to the field name so that you don't have a lot to remember. Sometimes with both names the same, Access doesn't know which of the two items you are referring to and it will cause a problem.

A good example of naming conventions can be found at
http://www.mvps.org/access/general/gen0012.htm

Does the function return the correct value, just the value doesn't go into the control?
--
Wayne Morgan
"Tony Williams" <tw@tcp.com> wrote in message

news:bl******** **@sparta.btint ernet.com...
Thanks Wayne, I think I get confused with field name and control name I
assumed they had to be the same. So, do I make the control source = field name in the table and the control name whatever I like. In which case when I want to refer to the field in code or a report do I use the control source name. If that's the case what is the purpose of the control name?

Sorry about the confusion the control is ComDocNbrtxt, I appended txt to
names so that I know it's a text field, have I got the convention the wrong way round?

Being a newbie at this at 58 means I have to work harder on the grey cells to make them cooperate!!!
But thanks for your patience and advice, I'll now try and put it into
practice and let you know how I got on.


Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1295
by: alejandro david weil | last post by:
Hello! I got the next problem and didn't see any reference to the behaviour that produces it, look: If we have a module like: --- mod.py --------------->8------ testvar2 = 15
5
2013
by: dody suria wijaya | last post by:
I found this problem when trying to split a module into two. Here's an example: ============== #Module a (a.py): from b import * class Main: pass ============== ==============
25
7741
by: Xah Lee | last post by:
Python Doc Problem Example: gzip Xah Lee, 20050831 Today i need to use Python to compress/decompress gzip files. Since i've read the official Python tutorial 8 months ago, have spent 30 minutes with Python 3 times a week since, have 14 years of computing experience, 8 years in mathematical computing and 4 years in unix admin and perl, i have quickly found the official doc: http://python.org/doc/2.4.1/lib/module-gzip.html
13
1607
by: bobueland | last post by:
I'm a newbie experimenting with Python. I want to incrementally develop a module called 'circle'. The problem is now that the file name is used for two purposes. To keep track of the version number and as the name for the module. So when I develop the first version of my file I have to call it circle_a.py. The name of the module then automatically becomes circle_a. But when I develop the next increment and call my file circle_b.py the...
3
1995
by: =?ISO-8859-1?Q?Gregory_Pi=F1ero?= | last post by:
Hi Python Experts, I hope I can explain this right. I'll try. Background: I have a module that I leave running in a server role. It has a module which has data in it that can change. So every nth time a function in the server gets called, I want to reload the module so it has the freshest data. But there's a lot of data so it takes 5-10 seconds to do a reload.
3
5903
by: Mac Campbell | last post by:
For some unknown reason my mdb seemed to drop a module I had named "Utilities". I tried to copy the module back in from a backup copy and got the error message "<<MyProject>> is currently unable to rename the form, report, or module to 'Utilities' ... Close the database, reopen it, and try the rename operation again." This didn't work. It seemed that other modules could still be renamed normally, but this one - "Utilities" - could not. I could...
6
1715
by: ai | last post by:
It assumes that there is a module A which have two global variables X and Y. If I run "import A" in the IDLE shell, then I can use A.X and A.Y correctly. But if I want to change the module A and then delete the variable Y, I find I can use A.Y just the same as before! In fact, I have tried all the following methods but can't remove the A.Y: execute "import A" again "reload(A)" "del A; import A" Yes, if you use "del A.Y", it works. But...
3
2694
by: Mitko Haralanov | last post by:
I have a Python module that I have written using the C API and I am having a problem accessing a dictionary from that module. Here is what I have done: 1. In my init function I call module = Py_InitModule ("name", methods); 2. then I get the module's __dict__ structure: dict = PyModule_GetDict (module); 3. Later, I insert a dictionary that I have constructed using the PyDict_* API
13
2284
by: Rafe | last post by:
Hi, I am in a situation where I feel I am being forced to abandon a clean module structure in favor of a large single module. If anyone can save my sanity here I would be forever grateful. My problem is that classes in several modules share a common base class which needs to implement a factory method to return instances of these same classes.
3
13423
ram09
by: ram09 | last post by:
After deploying our site in the iis7 server, we encountered this error... ModuleName AspNetInitializationExceptionModule Notification 1 HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode 0 ConfigExceptionInfo Notification BEGIN_REQUEST
0
8238
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8174
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.