GOLANGPROFI Telegram 227
👣 Код дает разные значения для b1 и b2
Почему?

Ответ

package main

func main() {
const s1 = "Hi World!"
s2 := s1 + ""
println(s1 == s2) //true
println(len(s1) == len(s2)) //true

var b1 byte = 1 << len(s1) / 128 // ==4
var b2 byte = 1 << len(s2) / 128 // ==0
println(b1, b2) // 4 0
}
👍7



tgoop.com/golangprofi/227
Create:
Last Update:

👣 Код дает разные значения для b1 и b2
Почему?

Ответ

package main

func main() {
const s1 = "Hi World!"
s2 := s1 + ""
println(s1 == s2) //true
println(len(s1) == len(s2)) //true

var b1 byte = 1 << len(s1) / 128 // ==4
var b2 byte = 1 << len(s2) / 128 // ==0
println(b1, b2) // 4 0
}

BY Golang Юниор


Share with your friend now:
tgoop.com/golangprofi/227

View MORE
Open in Telegram


Telegram News

Date: |

When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added. The optimal dimension of the avatar on Telegram is 512px by 512px, and it’s recommended to use PNG format to deliver an unpixelated avatar. Click “Save” ; During the meeting with TSE Minister Edson Fachin, Perekopsky also mentioned the TSE channel on the platform as one of the firm's key success stories. Launched as part of the company's commitments to tackle the spread of fake news in Brazil, the verified channel has attracted more than 184,000 members in less than a month.
from us


Telegram Golang Юниор
FROM American