Чт янв 20, 2022 09:15:57
Чт янв 20, 2022 11:28:58
Чт янв 20, 2022 19:15:20
Чт янв 20, 2022 20:18:45
Чт янв 20, 2022 20:25:58
ну так если не хотите, чтобы у вас в одном режиме тупо несколько байтов всегда пустовало, надо выравнивать. потому как память выделяется под наибольший размер элемента юниона.uldemir писал(а):А обязательно "выравнивать" длины union-ов?
Чт янв 20, 2022 20:46:30
Но мне там реально нужна 16 битная арифметика, так как там из потока я собираю координаты, которые и передаются в усеченном виде.#2624-D (ULP 5.4) Detected an assignment to a type with size less than int. To avoid unnecessary sign extension, use int-sized types for local varaibles and convert to smaller types for static storage. commandline.c /Robotic Maze line 178
Пт янв 21, 2022 22:00:33
Пт янв 21, 2022 22:35:55
Сб янв 22, 2022 13:03:31
Вс янв 23, 2022 14:46:04
Вт янв 25, 2022 08:17:35
type
Tclass1 = class(Tclass)
constructor Create(V : string);
end;
Tclass2 = class(Tclass)
constructor Create(V : string);
end;
constructor TClassN.ClassX(V : string); // N 1 или 2
begin
inherited Create(V, ConstN);
// some code
end;
Вт янв 25, 2022 10:29:38
#include <iostream>
template <uint32_t X, typename T>
auto foo(T val)
{
return T(val*X);
}
auto main() -> int
{
std::cout << foo<10>(20) << std::endl;
std::cout << foo<20>(11.22f) << std::endl;
}
template<unsigned N, auto f, auto... args>
inline void Repeat()
{
if constexpr (N > 0)
{
f(args...);
Repeat<N-1, f, args...>();
}
}
Repeat<5, []{ PA1::set(); PA1::clear(); }> ();
movs r3, #160 ; 0xa0
movs r2, #2
lsls r3, r3, #23
str r2, [r3, #24] ; PA1=1
strh r2, [r3, #26] ; PA1=0
str r2, [r3, #24] ; PA1=1
strh r2, [r3, #26] ; PA1=0
str r2, [r3, #24] ; PA1=1
strh r2, [r3, #26] ; PA1=0
str r2, [r3, #24] ; PA1=1
strh r2, [r3, #26] ; PA1=0
str r2, [r3, #24] ; PA1=1
strh r2, [r3, #26] ; PA1=0
Вт янв 25, 2022 12:49:23
Вт янв 25, 2022 13:00:40
Вт янв 25, 2022 14:25:08
Вт янв 25, 2022 14:54:18
Вт янв 25, 2022 15:48:27
Вт янв 25, 2022 15:52:39
Вт янв 25, 2022 16:36:31
Вт янв 25, 2022 19:36:45