CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Wed Mar 20, 2019 12:32 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Copying a struct
PostPosted: Fri Feb 16, 2018 11:49 am 
Offline

Joined: Mon Jan 29, 2018 11:18 am
Posts: 4
How to easiest copy the values of one struct to another of the same type? In C/C++ the assignment operator does this job but it seems this is not how it works in ST. Do I need to specify a specific copy function for each struct?


Top
   
 Post subject: Re: Copying a struct
PostPosted: Thu Feb 22, 2018 3:52 am 
Offline
Frequent User
Frequent User

Joined: Fri Sep 02, 2011 8:02 pm
Posts: 301
You basically need to perform a byte copy. See this post: https://forum.codesys.com/viewtopic.php?t=7671#p17493

_________________
Scott Cunningham
KEB America, Inc.
www.kebblog.com
www.kebamerica.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited